use of org.jboss.weld.resolution.TypeSafeBeanResolver in project core by weld.
the class ResolutionTest method testResolveWithAnonymousAnnotationLiteral.
@Test
public // WELD-711
void testResolveWithAnonymousAnnotationLiteral() throws Exception {
Annotation defaultQualifier = new AnnotationLiteral<Default>() {
};
assertNotNull(getReference(beanManager, Foo.class, defaultQualifier));
TypeSafeBeanResolver resolver = beanManager.getBeanResolver();
assertFalse(resolver.isCached(new ResolvableBuilder(beanManager).addType(Foo.class).addQualifier(defaultQualifier).create()));
}
use of org.jboss.weld.resolution.TypeSafeBeanResolver in project core by weld.
the class InstanceImpl method resolveBeans.
private Set<Bean<?>> resolveBeans() {
// Perform typesafe resolution, and possibly attempt to resolve the ambiguity
Resolvable resolvable = new ResolvableBuilder(getType(), getBeanManager()).addQualifiers(getQualifiers()).setDeclaringBean(getInjectionPoint().getBean()).create();
TypeSafeBeanResolver beanResolver = getBeanManager().getBeanResolver();
return beanResolver.resolve(beanResolver.resolve(resolvable, Reflections.isCacheable(getQualifiers())));
}
Aggregations