code: public static boolean hasAnnotation(AnnotatedElement elem, Class<? extends Annotation> annotationType,
                                          boolean checkMetaAnnotations) {
          if (elem.isAnnotationPresent(annotationType)) {
              return true;
          }
          if (checkMetaAnnotations) {
              for (Annotation a : elem.getAnnotations()) {
                  for (Annotation meta : a.annotationType().getAnnotations()) {
                      if (meta.annotationType().getName().equals(annotationType.getName())) {
                          return true;
                      }
                  }
              }
          }
          return false;
      }
docs: Checks if a Class or Method are annotated with the given annotation
  
  @param elem                 the Class or Method to reflect on
  @param annotationType       the annotation type
  @param checkMetaAnnotations check for meta annotations
  @return true if annotations is present