private static boolean validClass(String name){
  int len=name.length();
  outer:   for (int i=0; i < len && Character.isJavaIdentifierStart(name.charAt(i)); i++) {
    while (++i < len) {
      char c=name.charAt(i);
      if (c == '.') {
        continue outer;
      }
      if (!Character.isJavaIdentifierPart(c)) {
        return false;
      }
    }
    return true;
  }
  return false;
}

private static boolean validClass ( String name ) { int len = name . length ( ) ; outer : for ( int i = 0 ; i < len && Character . isJavaIdentifierStart ( name . charAt ( i ) ) ; i ++ ) { while ( ++ i < len ) { char c = name . charAt ( i ) ; if ( c == '.' ) { continue outer ; } if ( ! Character . isJavaIdentifierPart ( c ) ) { return false ; } } return true ; } return false ; }
returns true if the name is a syntactically valid fully qualified class name ( no whitespace permitted ) , and returns false otherwise .
