public List < Method > listMethods ( final Class < ? > classObj , final String methodName ) { // // Get the array of methods for my classname. // Method [ ] methods = classObj . getMethods ( ) ; List < Method > methodSignatures = new ArrayList < Method > ( ) ; // // Loop round all the methods and print them out. // for ( int ii = 0 ; ii < methods . length ; ++ ii ) { if ( methods [ ii ] . getName ( ) . equals ( methodName ) ) { methodSignatures . add ( methods [ ii ] ) ; } } return methodSignatures ; }
Given an object and a method name list the methods that match the method name on the class ..