FileDocCategorySizeDatePackage
TokenWithIndex.javaAPI DocGlassfish v2 API779Wed Feb 08 12:31:06 GMT 2006persistence.antlr

TokenWithIndex

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

Fields Summary
int
index
Index into token array indicating position in input stream
Constructors Summary
public TokenWithIndex()

	super();
    
public TokenWithIndex(int i, String t)

	super(i,t);
    
Methods Summary
public intgetIndex()

		return index;
	
public voidsetIndex(int i)

		index = i;
	
public java.lang.StringtoString()

		return "["+index+":\"" + getText() + "\",<" + getType() + ">,line=" + line + ",col=" +
col + "]\n";