code: public static <T extends Annotation> List<T> searchForAnnotation(Method method, Class<T> annotation) {
          if (method == null) {
              return Lists.newArrayList();
          }
          return searchClasses(method, annotation, method.getDeclaringClass());
      }
docs: Searches for all annotations of the given type on this method or on type level for all interfaces and superclasses
  
  @param method     the method to scan
  @param annotation the annotation to search for
  @param <T>        the type of the annotation
  @return the list of all method or type level annotations in the type hierarchy