public static void assertIdentifier ( String id ) throws IllegalArgumentException { if ( ! isIdentifier ( id ) ) { throw new IllegalArgumentException ( ( id == null ? "null" : ( "\"" + String . valueOf ( id ) + "\"" ) ) + " is not a valid identifier" ) ; } }
Throws an exception if the given string is not a valid identifier .