public Method findMethod ( String methodName , Class < ? > [ ] parameterTypes ) throws NoSuchMethodException { // make sure the constructor list is loaded maybeLoadMethods ( ) ; List < Member > methodList = _methodMap . get ( methodName ) ; if ( methodList == null ) { throw new NoSuchMethodException ( "No method named " + _clazz . getName ( ) + "." + methodName ) ; } if ( parameterTypes == null ) { parameterTypes = new Class < ? > [ 0 ] ; } return ( Method ) findMemberIn ( methodList , parameterTypes ) ; }
Returns the most specific public method in my target class that has the given name and accepts the number and type of parameters in the given Class array in a reflective invocation .