Class GroovySourceToken

  • All Implemented Interfaces:
    Cloneable, SourceInfo

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

      • line

        protected int line
      • col

        protected int col
      • lineLast

        protected int lineLast
      • colLast

        protected int colLast
    • Constructor Detail

      • GroovySourceToken

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

      • 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 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​(String s)
        set the source token text
        Overrides:
        setText in class Token
        Parameters:
        s - the text
      • 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