public static int getNumParameters ( String methodSignature ) { int start = methodSignature . indexOf ( ' ' ) + 1 ; int limit = methodSignature . lastIndexOf ( ' ' ) ; if ( ( limit - start ) == 0 ) { return 0 ; } int numParms = 0 ; for ( int i = start ; i < limit ; i ++ ) { if ( ! methodSignature . startsWith ( Values . SIG_ARRAY_PREFIX , i ) ) { if ( methodSignature . startsWith ( Values . SIG_QUALIFIED_CLASS_PREFIX , i ) ) { i = methodSignature . indexOf ( Values . SIG_QUALIFIED_CLASS_SUFFIX_CHAR , i + 1 ) ; } else if ( isWonkyEclipseSignature ( methodSignature , i ) ) { continue ; } numParms ++ ; } } return numParms ; }
returns the number of parameters in this method signature