Top Description Fields Constructors Methods
org.codehaus.groovy.antlr

public Class GroovySourceToken

extends Token
implements SourceInfo
Class Inheritance
All Implemented Interfaces
org.codehaus.groovy.antlr.SourceInfo
Imports
antlr.Token

This is a Token sub class to track line information

Field Summary

Modifier and TypeField and Description
protected int
protected int
protected int
protected int
protected String
Inherited from antlr.Token:
badTokenEOF_TYPEINVALID_TYPEMIN_USER_TYPENULL_TREE_LOOKAHEADSKIPtype

Constructor Summary

AccessConstructor and Description
public
GroovySourceToken(int
the type
t
)

Constructor using a token type

Method Summary

Modifier and TypeMethod and Description
public int
public int
public int
public int
public String

Returns:

the source token text
getText
()

Overrides antlr.Token.getText.

get the source token text
public void
setColumn(int
the column
c
)

Overrides antlr.Token.setColumn.

Implements org.codehaus.groovy.antlr.SourceInfo.setColumn.

set start column
public void
setColumnLast(int
the column
colLast
)

Implements org.codehaus.groovy.antlr.SourceInfo.setColumnLast.

set ending column
public void
setLine(int
the line
l
)

Overrides antlr.Token.setLine.

Implements org.codehaus.groovy.antlr.SourceInfo.setLine.

set start line
public void
setLineLast(int
the line
lineLast
)

Implements org.codehaus.groovy.antlr.SourceInfo.setLineLast.

set ending line
public void
setText(String
the text
s
)

Overrides antlr.Token.setText.

set the source token text
public String
toString()

Overrides antlr.Token.toString.

Returns a string representation of the object.
Inherited from antlr.Token:
getFilenamegetTypesetFilenamesetType

Field Detail

colback to summary
protected int col
colLastback to summary
protected int colLast
lineback to summary
protected int line
lineLastback to summary
protected int lineLast
textback to summary
protected String text

Constructor Detail

GroovySourceTokenback to summary
public GroovySourceToken(int t)

Constructor using a token type

Parameters
t:int

the type

Method Detail

getColumnback to summary
public int getColumn()

Overrides antlr.Token.getColumn.

Implements org.codehaus.groovy.antlr.SourceInfo.getColumn.

Doc from org.codehaus.groovy.antlr.SourceInfo.getColumn.

get starting column

Returns:int

the starting column

getColumnLastback to summary
public int getColumnLast()

Implements org.codehaus.groovy.antlr.SourceInfo.getColumnLast.

Doc from org.codehaus.groovy.antlr.SourceInfo.getColumnLast.

get ending column

Returns:int

the ending column

getLineback to summary
public int getLine()

Overrides antlr.Token.getLine.

Implements org.codehaus.groovy.antlr.SourceInfo.getLine.

Doc from org.codehaus.groovy.antlr.SourceInfo.getLine.

get start line

Returns:int

the starting line

getLineLastback to summary
public int getLineLast()

Implements org.codehaus.groovy.antlr.SourceInfo.getLineLast.

Doc from org.codehaus.groovy.antlr.SourceInfo.getLineLast.

get ending line

Returns:int

the ending line

getTextback to summary
public String getText()

Overrides antlr.Token.getText.

get the source token text

Returns:String

the source token text

setColumnback to summary
public void setColumn(int c)

Overrides antlr.Token.setColumn.

Implements org.codehaus.groovy.antlr.SourceInfo.setColumn.

Doc from org.codehaus.groovy.antlr.SourceInfo.setColumn.

set start column

Parameters
c:int

the column

setColumnLastback to summary
public void setColumnLast(int colLast)

Implements org.codehaus.groovy.antlr.SourceInfo.setColumnLast.

Doc from org.codehaus.groovy.antlr.SourceInfo.setColumnLast.

set ending column

Parameters
colLast:int

the column

setLineback to summary
public void setLine(int l)

Overrides antlr.Token.setLine.

Implements org.codehaus.groovy.antlr.SourceInfo.setLine.

Doc from org.codehaus.groovy.antlr.SourceInfo.setLine.

set start line

Parameters
l:int

the line

setLineLastback to summary
public void setLineLast(int lineLast)

Implements org.codehaus.groovy.antlr.SourceInfo.setLineLast.

Doc from org.codehaus.groovy.antlr.SourceInfo.setLineLast.

set ending line

Parameters
lineLast:int

the line

setTextback to summary
public void setText(String s)

Overrides antlr.Token.setText.

set the source token text

Parameters
s:String

the text

toStringback to summary
public String toString()

Overrides antlr.Token.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.