Top Description Fields Constructors Methods
org.hibernate.hql.ast

public Class HqlToken

extends CommonToken
Class Inheritance

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

Modifier and TypeField and Description
private boolean
possibleID

True if this token could be an identifier.

private int
tokenType

The previous token type.

Inherited from antlr.CommonToken:
collinetext

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private int

Returns:

int - The old token type.
getPreviousType
()

Returns the previous token type.

public boolean

Returns:

True if the token could be interpreted as in identifier, false if not.
isPossibleID
()

Returns true if the token could be an identifier.

public void
setPossibleID(boolean
True if this is a keyword/identifier, false if not.
possibleID
)

Set to true if this token can be interpreted as an identifier, false if not.

public void
setType(int
The new token type.
t
)

Overrides antlr.Token.setType.

Sets the type of the token, remembering the previous type.
public String

Returns:

String - The debug string.
toString
()

Overrides antlr.CommonToken.toString.

Returns a string representation of the object.
Inherited from antlr.CommonToken:
getColumngetLinegetTextsetColumnsetLinesetText

Field Detail

possibleIDback to summary
private boolean possibleID

True if this token could be an identifier. *

tokenTypeback to summary
private int tokenType

The previous token type. *

Constructor Detail

HqlTokenback to summary
public HqlToken()

Method Detail

getPreviousTypeback to summary
private int getPreviousType()

Returns the previous token type.

Returns:int

int - The old token type.

isPossibleIDback to summary
public boolean isPossibleID()

Returns true if the token could be an identifier.

Returns:boolean

True if the token could be interpreted as in identifier, false if not.

setPossibleIDback to summary
public void setPossibleID(boolean possibleID)

Set to true if this token can be interpreted as an identifier, false if not.

Parameters
possibleID:boolean

True if this is a keyword/identifier, false if not.

setTypeback to summary
public void setType(int t)

Overrides antlr.Token.setType.

Sets the type of the token, remembering the previous type.

Parameters
t:int

The new token type.

toStringback to summary
public String toString()

Overrides antlr.CommonToken.toString.

Returns a string representation of the object.

Returns:String

String - The debug string.