public static boolean isValidMethodSignature(String sig){
  int len=sig.length();
  if (len == 0)   return false;
  int i=0;
  char c=sig.charAt(i++);
  if (c != '(')   return false;
  if (i >= len)   return false;
  while (sig.charAt(i) != ')') {
    i=checkTypeSignature(sig,i,len,false);
    if (i == -1)     return false;
    if (i >= len)     return false;
  }
  ++i;
  i=checkTypeSignature(sig,i,len,true);
  return i == len;
}

public static boolean isValidMethodSignature ( String sig ) { int len = sig . length ( ) ; if ( len == 0 ) return false ; int i = 0 ; char c = sig . charAt ( i ++ ) ; if ( c != '(' ) return false ; if ( i >= len ) return false ; while ( sig . charAt ( i ) != ')' ) { i = checkTypeSignature ( sig , i , len , false ) ; if ( i == - 1 ) return false ; if ( i >= len ) return false ; } ++ i ; i = checkTypeSignature ( sig , i , len , true ) ; return i == len ; }
returns true if the given method signature is valid , false if it is not .
