Package org.codehaus.groovy.antlr
Class GroovySourceToken
- java.lang.Object
-
- antlr.Token
-
- org.codehaus.groovy.antlr.GroovySourceToken
-
- All Implemented Interfaces:
java.lang.Cloneable,SourceInfo
public class GroovySourceToken extends antlr.Token implements SourceInfo
This is a Token sub class to track line information
-
-
Constructor Summary
Constructors Constructor Description GroovySourceToken(int t)Constructor using a token type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumn()get starting columnintgetColumnLast()get ending columnintgetLine()get start lineintgetLineLast()get ending linejava.lang.StringgetText()get the source token textvoidsetColumn(int c)set start columnvoidsetColumnLast(int colLast)set ending columnvoidsetLine(int l)set start linevoidsetLineLast(int lineLast)set ending linevoidsetText(java.lang.String s)set the source token textjava.lang.StringtoString()
-
-
-
Method Detail
-
getLine
public int getLine()
Description copied from interface:SourceInfoget start line- Specified by:
getLinein interfaceSourceInfo- Overrides:
getLinein classantlr.Token- Returns:
- the starting line
-
getText
public java.lang.String getText()
get the source token text- Overrides:
getTextin classantlr.Token- Returns:
- the source token text
-
setLine
public void setLine(int l)
Description copied from interface:SourceInfoset start line- Specified by:
setLinein interfaceSourceInfo- Overrides:
setLinein classantlr.Token- Parameters:
l- the line
-
setText
public void setText(java.lang.String s)
set the source token text- Overrides:
setTextin classantlr.Token- Parameters:
s- the text
-
toString
public java.lang.String toString()
- Overrides:
toStringin classantlr.Token
-
getColumn
public int getColumn()
Description copied from interface:SourceInfoget starting column- Specified by:
getColumnin interfaceSourceInfo- Overrides:
getColumnin classantlr.Token- Returns:
- the starting column
-
setColumn
public void setColumn(int c)
Description copied from interface:SourceInfoset start column- Specified by:
setColumnin interfaceSourceInfo- Overrides:
setColumnin classantlr.Token- Parameters:
c- the column
-
getLineLast
public int getLineLast()
Description copied from interface:SourceInfoget ending line- Specified by:
getLineLastin interfaceSourceInfo- Returns:
- the ending line
-
setLineLast
public void setLineLast(int lineLast)
Description copied from interface:SourceInfoset ending line- Specified by:
setLineLastin interfaceSourceInfo- Parameters:
lineLast- the line
-
getColumnLast
public int getColumnLast()
Description copied from interface:SourceInfoget ending column- Specified by:
getColumnLastin interfaceSourceInfo- Returns:
- the ending column
-
setColumnLast
public void setColumnLast(int colLast)
Description copied from interface:SourceInfoset ending column- Specified by:
setColumnLastin interfaceSourceInfo- Parameters:
colLast- the column
-
-