Class type = annotation.annotationType();
assertEquals(TestAnnotations.VoidTyped.class, type);
}
public void testFieldAnn2() {
final AnnotationReader reader = AnnotationReader.getReaderFor(Target.FIELD.getDeclaringClass());
Annotation annotation = reader.getAnnotation("test.TestAnnotations$DefaultString", Target.FIELD);
Class type = annotation.annotationType();
assertEquals(TestAnnotations.DefaultString.class, type);
TestAnnotations.DefaultString ann = (TestAnnotations.DefaultString)annotation;
assertEquals("hello", ann.value());