Package org.hibernate.hql.ast
Class HqlToken
java.lang.Object
antlr.Token
antlr.CommonToken
org.hibernate.hql.ast.HqlToken
- All Implemented Interfaces:
Cloneable
A custom token class for the HQL grammar.
NOTE: This class must be public becuase it is instantiated by the ANTLR library. Ignore any suggestions by various code 'analyzers' about this class being package local.
-
Field Summary
Fields inherited from class antlr.CommonToken
col, line, textFields inherited from class antlr.Token
badToken, EOF_TYPE, INVALID_TYPE, MIN_USER_TYPE, NULL_TREE_LOOKAHEAD, SKIP, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the token could be an identifier.voidsetPossibleID(boolean possibleID) Set to true if this token can be interpreted as an identifier, false if not.voidsetType(int t) Sets the type of the token, remembering the previous type.toString()Returns a string representation of the object.Methods inherited from class antlr.CommonToken
getColumn, getLine, getText, setColumn, setLine, setTextMethods inherited from class antlr.Token
getFilename, getType, setFilename
-
Constructor Details
-
HqlToken
public HqlToken()
-
-
Method Details
-
isPossibleID
public boolean isPossibleID()Returns true if the token could be an identifier.- Returns:
- True if the token could be interpreted as in identifier, false if not.
-
setType
public void setType(int t) Sets the type of the token, remembering the previous type.- Overrides:
setTypein classantlr.Token- Parameters:
t- The new token type.
-
setPossibleID
public void setPossibleID(boolean possibleID) Set to true if this token can be interpreted as an identifier, false if not.- Parameters:
possibleID- True if this is a keyword/identifier, false if not.
-
toString
Returns a string representation of the object.- Overrides:
toStringin classantlr.CommonToken- Returns:
- String - The debug string.
-