use of org.jboss.weld.annotated.enhanced.EnhancedAnnotatedMethod in project core by weld.
the class SimpleWeldClassTest method testWeldClassForCovariantReturnType.
/*
* description = "WELD-568"
*/
@Category(Broken.class)
@Test
public void testWeldClassForCovariantReturnType() {
TypeStore typeStore = new TypeStore();
EnhancedAnnotatedType<Attacker> weldClass = new ClassTransformer(typeStore, new SharedObjectCache(), ReflectionCacheFactory.newInstance(typeStore), RegistrySingletonProvider.STATIC_INSTANCE).getEnhancedAnnotatedType(Attacker.class, AnnotatedTypeIdentifier.NULL_BDA_ID);
Collection<EnhancedAnnotatedMethod<?, ? super Attacker>> methods = weldClass.getEnhancedMethods();
Assert.assertEquals(4, methods.size());
List<EnhancedAnnotatedMethod<?, ?>> interceptableMethods = Beans.getInterceptableMethods(weldClass);
Assert.assertEquals(4, interceptableMethods.size());
}
use of org.jboss.weld.annotated.enhanced.EnhancedAnnotatedMethod in project core by weld.
the class SimpleWeldClassTest method testWeldClassForGenericSuperclass.
/*
* description = "WELD-568"
*/
@Test
public void testWeldClassForGenericSuperclass() {
TypeStore ts = new TypeStore();
EnhancedAnnotatedType<StringProcessor> weldClass = new ClassTransformer(ts, new SharedObjectCache(), ReflectionCacheFactory.newInstance(ts), RegistrySingletonProvider.STATIC_INSTANCE).getEnhancedAnnotatedType(StringProcessor.class, AnnotatedTypeIdentifier.NULL_BDA_ID);
Collection<EnhancedAnnotatedMethod<?, ? super StringProcessor>> methods = weldClass.getEnhancedMethods();
// assert methods.size() == 2;
List<EnhancedAnnotatedMethod<?, ?>> interceptableMethods = Beans.getInterceptableMethods(weldClass);
Assert.assertEquals(3, interceptableMethods.size());
}
Aggregations