@ Override public String generateNextName ( ) { String name ; do { name = prefix ; int i = nameCount ; if ( name . isEmpty ( ) ) { int pos = i % firstChars . length ; name = String . valueOf ( firstChars [ pos ] . name ) ; i /= firstChars . length ; } while ( i > 0 ) { i -- ; int pos = i % nonFirstChars . length ; name += nonFirstChars [ pos ] . name ; i /= nonFirstChars . length ; } nameCount ++ ; // Make sure it's not a JS keyword or reserved name. } while ( TokenStream . isKeyword ( name ) || reservedNames . contains ( name ) ) ; return name ; }
Generates the next short name .