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 int
col
protected int
colLast
protected int
line
protected int
lineLast
protected java.lang.String
text
-
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 int
getColumn()
get starting columnint
getColumnLast()
get ending columnint
getLine()
get start lineint
getLineLast()
get ending linejava.lang.String
getText()
get the source token textvoid
setColumn(int c)
set start columnvoid
setColumnLast(int colLast)
set ending columnvoid
setLine(int l)
set start linevoid
setLineLast(int lineLast)
set ending linevoid
setText(java.lang.String s)
set the source token textjava.lang.String
toString()
-
Methods inherited from class antlr.Token
getFilename, getType, setFilename, setType
-
-
-
-
Method Detail
-
getLine
public int getLine()
Description copied from interface:SourceInfo
get start line- Specified by:
getLine
in interfaceSourceInfo
- Overrides:
getLine
in 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:SourceInfo
set start line- Specified by:
setLine
in interfaceSourceInfo
- Overrides:
setLine
in 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:SourceInfo
get starting column- Specified by:
getColumn
in interfaceSourceInfo
- Overrides:
getColumn
in classToken
- Returns:
- the starting column
-
setColumn
public void setColumn(int c)
Description copied from interface:SourceInfo
set start column- Specified by:
setColumn
in interfaceSourceInfo
- Overrides:
setColumn
in classToken
- Parameters:
c
- the column
-
getLineLast
public int getLineLast()
Description copied from interface:SourceInfo
get ending line- Specified by:
getLineLast
in interfaceSourceInfo
- Returns:
- the ending line
-
setLineLast
public void setLineLast(int lineLast)
Description copied from interface:SourceInfo
set ending line- Specified by:
setLineLast
in interfaceSourceInfo
- Parameters:
lineLast
- the line
-
getColumnLast
public int getColumnLast()
Description copied from interface:SourceInfo
get ending column- Specified by:
getColumnLast
in interfaceSourceInfo
- Returns:
- the ending column
-
setColumnLast
public void setColumnLast(int colLast)
Description copied from interface:SourceInfo
set ending column- Specified by:
setColumnLast
in interfaceSourceInfo
- Parameters:
colLast
- the column
-
-