code: protected Map<Method, Class<? extends Annotation>> discoverMethods(Collection<Class<?>> classes) {
          // collect the allowed annotated methods
          Map<Method, Class<? extends Annotation>> discoveredMethods = new LinkedHashMap<>();
  
          // discover all annotated controllers and methods
          for (Class<?> controllerClass : classes) {
              for (Method method : controllerClass.getDeclaredMethods()) {
                  if (RequireUtil.allowMethod(settings, method)) {
                      for (Annotation annotation : method.getAnnotations()) {
                          Class<? extends Annotation> annotationClass = annotation.annotationType();
                          if (httpMethodAnnotationClasses.contains(annotationClass)) {
                              discoveredMethods.put(method, annotationClass);
                              break;
                          }
                      }
                  }
              }
          }
  
          return discoveredMethods;
      }
docs: Discover Route methods.
  
  @param classes
  @return discovered methods