public static Method findMethod ( String name , Class < ? > cls ) { for ( Method method : cls . getDeclaredMethods ( ) ) { if ( method . getName ( ) . equals ( name ) ) { return method ; } } throw new ExecutionException ( "invalid auto-function: no '" + name + "' method declared" , null ) ; }
Finds a named declared method on the given class .