Class IdentifierToken
java.lang.Object
com.google.javascript.jscomp.parsing.parser.Token
com.google.javascript.jscomp.parsing.parser.IdentifierToken
A token representing an identifier.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the identifier, allowing it to be a private identifier.getValue()
Gets the value of the identifier assuring that it is not a private identifier.boolean
boolean
Whether the value starts with a #.toString()
boolean
valueEquals
(String str) Methods inherited from class com.google.javascript.jscomp.parsing.parser.Token
asIdentifier, asLiteral, asTemplateLiteral, getStart
-
Constructor Details
-
IdentifierToken
-
-
Method Details
-
toString
-
isKeyword
public boolean isKeyword() -
valueEquals
-
getValue
Gets the value of the identifier assuring that it is not a private identifier.You must verify privateIdentifier is false (and presumably error if it is true) before calling this method.
Prefer calling
isKeyword()
orvalueEquals(String)
if those methods meet your needs. -
getMaybePrivateValue
Gets the value of the identifier, allowing it to be a private identifier. -
isPrivateIdentifier
public boolean isPrivateIdentifier()Whether the value starts with a #.
-