public int getIndex ( String methodName , Class ... paramTypes ) { for ( int i = 0 , n = methodNames . length ; i < n ; i ++ ) if ( methodNames [ i ] . equals ( methodName ) && Arrays . equals ( paramTypes , parameterTypes [ i ] ) ) return i ; throw new IllegalArgumentException ( "Unable to find non-private method: " + methodName + " " + Arrays . toString ( paramTypes ) ) ; }
Returns the index of the first method with the specified name and param types .