Package antlr

Class 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 Detail

      • index

        int index
        Index into token array indicating position in input stream
    • 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()