code: private Map<Method, Class<? extends Annotation>> getControllerMethods(Class<? extends Controller> controllerClass) {
          // collect the annotated methods
          Map<Method, Class<? extends Annotation>> controllerMethods = new LinkedHashMap<>();
  
          // discover all annotated controllers methods
          for (Method method : ClassUtils.getDeclaredMethods(controllerClass)) {
              for (Annotation annotation : method.getAnnotations()) {
                  Class<? extends Annotation> annotationClass = annotation.annotationType();
                  if (httpMethodAnnotationClasses.contains(annotationClass)) {
                      controllerMethods.put(method, annotationClass);
                      break;
                  }
              }
          }
  
          return controllerMethods;
      }
docs: Discover Route methods.
  
  @param controllerClass
  @return discovered methods