AnnotationUtil { public static <A extends Annotation> List<A> findAnnotationsInClassTree(PmObjectBase pm, Class<A> annotationClass) { List<A> foundAnnotations = pm.getPmMetaDataWithoutPmInitCall().isPmField ? findAnnotationsInClassTree(pm.getPmParent().getClass(), pm.getPmName(), annotationClass) : new ArrayList<A>(); foundAnnotations.addAll(findAnnotationsInClassTree(pm.getClass(), annotationClass)); return foundAnnotations; }  static A findAnnotationInClassTree(Class<?> classToAnalyze, Class<A> annotationClass); static T findAnnotation(PmObjectBase pm, Class<? extends T> annotationClass); static T getAnnotation(PmObjectBase pm, Class<? extends T> annotationClass); static T findAnnotation(PmObjectBase pm, Class<T> annotationClass, Class<?> parentClass); static List<Annotation> findAnnotations(PmObjectBase pm, Collection<Class<? extends Annotation>> annotationClassesToConsider); static List<A> findAnnotationsInClassTree(PmObjectBase pm, Class<A> annotationClass); static List<Method> findAnnotatedMethodsTopDown(final Class<?> type,
      final Class<? extends Annotation> annotation);  }
@Test public void shouldFindTwoAnnotationsInClassTree() { List<Author> annotations = AnnotationUtil.findAnnotationsInClassTree(new Cherry(new PmConversationImpl()), Author.class); assertEquals(2, annotations.size()); assertEquals("Peter Pan", annotations.get(0).name()); assertEquals("Max Mustermann", annotations.get(1).name()); }