code: 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;
      }
docs: returns the number of parameters in this method signature
  
  @param methodSignature
  the method signature to parse
  @return the number of parameters