Property implements AnnotatedElement { public String getName() { return name; } Property(Method method);  Property(Field field); String getName(); @Override T getAnnotation(Class<T> annotationClass); @Override Annotation[] getAnnotations(); @Override Annotation[] getDeclaredAnnotations(); Class<?> getDeclaringClass(); PropertyType getType(); String toString();  }
@Test public void testArrayComponentType() { assertThat(propertyType(ExampleCrd.class, "arrayProperty").arrayBase().getName(), is(String.class.getName())); assertThat(propertyType(ExampleCrd.class, "arrayProperty2").arrayBase().getName(), is(String.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfInts").arrayBase().getName(), is(Integer.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfInts2").arrayBase().getName(), is(Integer.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfObjects").arrayBase().getName(), is(ExampleCrd.ObjectProperty.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfPolymorphic").arrayBase().getName(), is(ExampleCrd.PolymorphicTop.class.getName())); assertThat(propertyType(ExampleCrd.class, "rawList").arrayBase().getName(), is(Object.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfRawList").arrayBase().getName(), is(Object.class.getName())); assertThat(propertyType(ExampleCrd.class, "arrayOfList").arrayBase().getName(), is(String.class.getName())); assertThat(propertyType(ExampleCrd.class, "arrayOfRawList").arrayBase().getName(), is(Object.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfArray").arrayBase().getName(), is(String.class.getName())); assertThat(propertyType(ExampleCrd.class, "arrayOfTypeVar").arrayBase().getName(), is(Object.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfTypeVar").arrayBase().getName(), is(Object.class.getName())); assertThat(propertyType(ExampleCrd.class, "arrayOfBoundTypeVar").arrayBase().getName(), is(Number.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfBoundTypeVar").arrayBase().getName(), is(Number.class.getName())); assertThat(propertyType(ExampleCrd.class, "arrayOfBoundTypeVar2").arrayBase().getName(), is(Number.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfBoundTypeVar2").arrayBase().getName(), is(Number.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfWildcardTypeVar1").arrayBase().getName(), is(String.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfWildcardTypeVar2").arrayBase().getName(), is(Number.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfWildcardTypeVar3").arrayBase().getName(), is(Number.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfWildcardTypeVar4").arrayBase().getName(), is(Number.class.getName())); assertThat(propertyType(ExampleCrd.class, "listOfMaps").arrayBase().getName(), is(Map.class.getName())); }