code: public static <T extends Annotation> T findAnnotation(Class<?> clazz, Class<T> annotationClazz) {
          T annotation = clazz.getAnnotation(annotationClazz);
          if (annotation != null) {
              return annotation;
          }
  
          Set<Class<?>> superTypes = ReflectionUtils.getSuperTypes(clazz);
          for (Class<?> type : superTypes) {
              annotation = type.getAnnotation(annotationClazz);
              if (annotation != null) {
                  return annotation;
              }
          }
  
          if (stereotypeAnnotationClass != null) {
              List<Class<?>> annotations = new ArrayList<>();
              for (Class<?> type : superTypes) {
                  for (Annotation a : type.getAnnotations()) {
                      annotations.add(a.annotationType());
                  }
              }
  
              return findAnnotation(annotations, annotationClazz);
          }
  
          return null;
      }
docs: Returns the annotation object for the specified annotation class of the
  given class object. All super types of the given class are examined to
  find the annotation. If a stereotype annotation is found, the annotations
  present on an annotation are also examined.
  
  @param <T>             The annotation type
  @param clazz           The class in which to look for the annotation
  @param annotationClazz The type of the annotation to look for
  @return The annotation with the given type if found, otherwise null