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 Token implements SourceInfo
This is a Token sub class to track line information
-
-
Field Summary
Fields Modifier and Type Field Description protected intcolprotected intcolLastprotected intlineprotected intlineLastprotected java.lang.Stringtext-
Fields inherited from class antlr.Token
badToken, EOF_TYPE, INVALID_TYPE, MIN_USER_TYPE, NULL_TREE_LOOKAHEAD, SKIP, type
-
-
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()-
Methods inherited from class antlr.Token
getFilename, getType, setFilename, setType
-
-
-
-
Method Detail
-
getLine
public int getLine()
Description copied from interface:SourceInfoget start line- Specified by:
getLinein interfaceSourceInfo- Overrides:
getLinein classToken- Returns:
- the starting line
-
getText
public java.lang.String getText()
get the source token text
-
setLine
public void setLine(int l)
Description copied from interface:SourceInfoset start line- Specified by:
setLinein interfaceSourceInfo- Overrides:
setLinein classToken- Parameters:
l- the line
-
setText
public void setText(java.lang.String s)
set the source token text
-
getColumn
public int getColumn()
Description copied from interface:SourceInfoget starting column- Specified by:
getColumnin interfaceSourceInfo- Overrides:
getColumnin classToken- Returns:
- the starting column
-
setColumn
public void setColumn(int c)
Description copied from interface:SourceInfoset start column- Specified by:
setColumnin interfaceSourceInfo- Overrides:
setColumnin classToken- 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
-
-