@Test public void select() { Instance<Object> objectInstance = new ObjectInstance(); Instance<Object> defaultInstance = objectInstance.select(new AnnotationLiteral<Default>() { }); assertFalse(defaultInstance.isUnsatisfied()); assertTrue(defaultInstance.isAmbiguous()); Bean<ApplicationScopedBean> bean = (Bean<ApplicationScopedBean>) beanManager.resolve(beanManager.getBeans(ApplicationScopedBean.class)); CreationalContext<ApplicationScopedBean> creationalContext = beanManager.createCreationalContext(bean); ApplicationScopedBean contextualReference = (ApplicationScopedBean) beanManager.getReference(bean, ApplicationScopedBean.class, creationalContext); ApplicationScopedBean applicationScopedBean = objectInstance.select(ApplicationScopedBean.class).get(); assertEquals(contextualReference, applicationScopedBean); }
public Instance<Object> select(Annotation... arg0) { return delegate.select(arg0); }
ObjectInstance implements Instance<Object> { public Instance<Object> select(Annotation... arg0) { return delegate.select(arg0); } }
ObjectInstance implements Instance<Object> { public Instance<Object> select(Annotation... arg0) { return delegate.select(arg0); } ObjectInstance(); }
ObjectInstance implements Instance<Object> { public Instance<Object> select(Annotation... arg0) { return delegate.select(arg0); } ObjectInstance(); Object get(); boolean isAmbiguous(); boolean isUnsatisfied(); Iterator<Object> iterator(); Instance<Object> select(Annotation... arg0); Instance<U> select(Class<U> arg0, Annotation... arg1); Instance<U> select(TypeLiteral<U> arg0, Annotation... arg1); }
ObjectInstance implements Instance<Object> { public Instance<Object> select(Annotation... arg0) { return delegate.select(arg0); } ObjectInstance(); Object get(); boolean isAmbiguous(); boolean isUnsatisfied(); Iterator<Object> iterator(); Instance<Object> select(Annotation... arg0); Instance<U> select(Class<U> arg0, Annotation... arg1); Instance<U> select(TypeLiteral<U> arg0, Annotation... arg1);  }