Class GroovySourceToken

java.lang.Object
antlr.Token
org.codehaus.groovy.antlr.GroovySourceToken
All Implemented Interfaces:
java.lang.Cloneable, SourceInfo

public class GroovySourceToken
extends Token
implements SourceInfo
This is a Token sub class to track line information
  • Field Details

    • line

      protected int line
    • text

      protected java.lang.String text
    • col

      protected int col
    • lineLast

      protected int lineLast
    • colLast

      protected int colLast
  • Constructor Details

    • GroovySourceToken

      public GroovySourceToken​(int t)
      Constructor using a token type
      Parameters:
      t - the type
  • Method Details

    • getLine

      public int getLine()
      Description copied from interface: SourceInfo
      get start line
      Specified by:
      getLine in interface SourceInfo
      Overrides:
      getLine in class Token
      Returns:
      the starting line
    • getText

      public java.lang.String getText()
      get the source token text
      Overrides:
      getText in class Token
      Returns:
      the source token text
    • setLine

      public void setLine​(int l)
      Description copied from interface: SourceInfo
      set start line
      Specified by:
      setLine in interface SourceInfo
      Overrides:
      setLine in class Token
      Parameters:
      l - the line
    • setText

      public void setText​(java.lang.String s)
      set the source token text
      Overrides:
      setText in class Token
      Parameters:
      s - the text
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class Token
    • getColumn

      public int getColumn()
      Description copied from interface: SourceInfo
      get starting column
      Specified by:
      getColumn in interface SourceInfo
      Overrides:
      getColumn in class Token
      Returns:
      the starting column
    • setColumn

      public void setColumn​(int c)
      Description copied from interface: SourceInfo
      set start column
      Specified by:
      setColumn in interface SourceInfo
      Overrides:
      setColumn in class Token
      Parameters:
      c - the column
    • getLineLast

      public int getLineLast()
      Description copied from interface: SourceInfo
      get ending line
      Specified by:
      getLineLast in interface SourceInfo
      Returns:
      the ending line
    • setLineLast

      public void setLineLast​(int lineLast)
      Description copied from interface: SourceInfo
      set ending line
      Specified by:
      setLineLast in interface SourceInfo
      Parameters:
      lineLast - the line
    • getColumnLast

      public int getColumnLast()
      Description copied from interface: SourceInfo
      get ending column
      Specified by:
      getColumnLast in interface SourceInfo
      Returns:
      the ending column
    • setColumnLast

      public void setColumnLast​(int colLast)
      Description copied from interface: SourceInfo
      set ending column
      Specified by:
      setColumnLast in interface SourceInfo
      Parameters:
      colLast - the column