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 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()
-
-
-
Method Detail
-
getLine
public int getLine()
Description copied from interface:SourceInfo
get start line- Specified by:
getLine
in interfaceSourceInfo
- Overrides:
getLine
in classantlr.Token
- Returns:
- the starting line
-
getText
public java.lang.String getText()
get the source token text- Overrides:
getText
in classantlr.Token
- Returns:
- 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 classantlr.Token
- Parameters:
l
- the line
-
setText
public void setText(java.lang.String s)
set the source token text- Overrides:
setText
in classantlr.Token
- Parameters:
s
- the text
-
toString
public java.lang.String toString()
- Overrides:
toString
in classantlr.Token
-
getColumn
public int getColumn()
Description copied from interface:SourceInfo
get starting column- Specified by:
getColumn
in interfaceSourceInfo
- Overrides:
getColumn
in classantlr.Token
- 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 classantlr.Token
- 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
-
-