persistence.antlr
Class TokenWithIndex

java.lang.Object
  extended by persistence.antlr.Token
      extended by persistence.antlr.CommonToken
          extended by persistence.antlr.TokenWithIndex
All Implemented Interfaces:
java.lang.Cloneable

public class TokenWithIndex
extends CommonToken

This token knows what index 0..n-1 it is from beginning of stream. Designed to work with TokenStreamRewriteEngine.java


Field Summary
 
Fields inherited from class persistence.antlr.CommonToken
col, line, text
 
Fields inherited from class persistence.antlr.Token
badToken, EOF_TYPE, INVALID_TYPE, MIN_USER_TYPE, NULL_TREE_LOOKAHEAD, SKIP
 
Constructor Summary
TokenWithIndex()
           
TokenWithIndex(int i, java.lang.String t)
           
 
Method Summary
 int getIndex()
           
 void setIndex(int i)
           
 java.lang.String toString()
           
 
Methods inherited from class persistence.antlr.CommonToken
getColumn, getLine, getText, setColumn, setLine, setText
 
Methods inherited from class persistence.antlr.Token
getFilename, getType, setFilename, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TokenWithIndex

public TokenWithIndex()

TokenWithIndex

public TokenWithIndex(int i,
                      java.lang.String t)
Method Detail

setIndex

public void setIndex(int i)

getIndex

public int getIndex()

toString

public java.lang.String toString()
Overrides:
toString in class CommonToken