protected Method findMethod ( Class < ? > controllerClass , String name ) { // identify first method which matches the name Method controllerMethod = null ; for ( Method method : controllerClass . getMethods ( ) ) { if ( method . getName ( ) . equals ( name ) ) { if ( controllerMethod == null ) { controllerMethod = method ; } else { throw new FatalException ( "Found overloaded controller method '{}'. Method names must be unique!" , Util . toString ( method ) ) ; } } } return controllerMethod ; }
Finds the named controller method .