@Test public void testArrayOfEnumAnnotations() { Mirror<ArrayOfEnumAnnotationObject> mirror = Mirrors.newMirrorFactory().getMirror(ArrayOfEnumAnnotationObject.class); final List<Annotation> annotations = mirror.getProperty("property").getAnnotations(); Assert.assertEquals(1, annotations.size()); final Annotation annotation = annotations.iterator().next(); final AnnotationProperty annotationProperty = annotation.getProperties().get("values"); final TestEnum[] value = (TestEnum[]) annotationProperty.getValue(); Assert.assertEquals(2, value.length); Assert.assertSame(TestEnum.VALUE1, value[0]); Assert.assertSame(TestEnum.VALUE2, value[1]); }
public java.util.Map<String, AnnotationProperty> getProperties() { return properties; }
Annotation { public java.util.Map<String, AnnotationProperty> getProperties() { return properties; } }
Annotation { public java.util.Map<String, AnnotationProperty> getProperties() { return properties; } Annotation(Class<?> annotationClass, boolean visible, java.util.Map<String, AnnotationProperty> properties); }
Annotation { public java.util.Map<String, AnnotationProperty> getProperties() { return properties; } Annotation(Class<?> annotationClass, boolean visible, java.util.Map<String, AnnotationProperty> properties); Class<?> getAnnotationClass(); boolean isVisible(); java.util.Map<String, AnnotationProperty> getProperties(); @Override int hashCode(); @Override boolean equals(Object obj); }
Annotation { public java.util.Map<String, AnnotationProperty> getProperties() { return properties; } Annotation(Class<?> annotationClass, boolean visible, java.util.Map<String, AnnotationProperty> properties); Class<?> getAnnotationClass(); boolean isVisible(); java.util.Map<String, AnnotationProperty> getProperties(); @Override int hashCode(); @Override boolean equals(Object obj);  }