private static boolean validMethod(String name){
  int len=name.length();
  if (len == 0) {
    return false;
  }
  char c=name.charAt(0);
  if (!Character.isJavaIdentifierStart(c) && !(c == '*' && len > 1)) {
    return false;
  }
  if (c != '*' && name.charAt(len - 1) == '*') {
    len--;
  }
  while (--len >= 1) {
    if (!Character.isJavaIdentifierPart(name.charAt(len))) {
      return false;
    }
  }
  return true;
}

private static boolean validMethod ( String name ) { int len = name . length ( ) ; if ( len == 0 ) { return false ; } char c = name . charAt ( 0 ) ; if ( ! Character . isJavaIdentifierStart ( c ) && ! ( c == '*' && len > 1 ) ) { return false ; } if ( c != '*' && name . charAt ( len - 1 ) == '*' ) { len -- ; } while ( -- len >= 1 ) { if ( ! Character . isJavaIdentifierPart ( name . charAt ( len ) ) ) { return false ; } } return true ; }
returns true if the name is a syntactically valid method name , or if the name is a syntactically valid method name with a ' * ' appended or could be constructed from some syntactically valid method name containing more than two characters by replacing the first character of that name with ' * ' , and returns false otherwise .
