docs: public static <T extends Annotation> Method findMethodWithAnnotation(Class<?> clazz, Class<T> annotationType) {
          Method annotatedMethod = null;
          for (Method method : clazz.getDeclaredMethods()) {
              T annotation = AnnotationUtils.findAnnotation(method, annotationType);
              if (annotation != null) {
                  if (annotatedMethod != null) {
                      throw new BeanCreationException("Only ONE method with @" + annotationType.getName()
                            + " is allowed on " + clazz.getName() + ".");
                  }
                  annotatedMethod = method;
              }
          }
  
          if((annotatedMethod != null) || clazz.equals(Object.class)){
              return annotatedMethod;
          } else {
              return findMethodWithAnnotation(clazz.getSuperclass(), annotationType);
          }
      }