Package org.codehaus.groovy.antlr
Class GroovySourceToken
- java.lang.Object
-
- antlr.Token
-
- org.codehaus.groovy.antlr.GroovySourceToken
-
- All Implemented Interfaces:
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 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 lineString
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(String s)
set the source token textString
toString()
-
Methods inherited from class antlr.Token
getFilename, getType, setFilename, setType
-
-
-
-
Field Detail
-
line
protected int line
-
text
protected String text
-
col
protected int col
-
lineLast
protected int lineLast
-
colLast
protected int colLast
-
-
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 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(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
-
-