Class GroovyToken
- java.lang.Object
-
- net.sourceforge.pmd.lang.groovy.ast.impl.antlr4.GroovyToken
-
- All Implemented Interfaces:
Comparable<GroovyToken>
,GenericToken<GroovyToken>
,Reportable
public class GroovyToken extends Object implements GenericToken<GroovyToken>
A Groovy specific token representation. This is simply a copy ofAntlrToken
but referencing the jarjared version of antlr4 used by the groovy lexer.
-
-
Constructor Summary
Constructors Constructor Description GroovyToken(groovyjarjarantlr4.v4.runtime.Token token, GroovyToken previousComment, TextDocument textDoc)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(GroovyToken o)
CharSequence
getImageCs()
int
getKind()
GroovyToken
getNext()
GroovyToken
getPreviousComment()
TextRegion
getRegion()
Returns a text region with the coordinates of this token.FileLocation
getReportLocation()
boolean
isDefault()
boolean
isEof()
boolean
isHidden()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.GenericToken
getImage, imageEquals, isImplicit
-
-
-
-
Constructor Detail
-
GroovyToken
public GroovyToken(groovyjarjarantlr4.v4.runtime.Token token, GroovyToken previousComment, TextDocument textDoc)
Constructor- Parameters:
token
- The antlr token implementationpreviousComment
- The previous commenttextDoc
- The text document
-
-
Method Detail
-
getNext
public GroovyToken getNext()
- Specified by:
getNext
in interfaceGenericToken<GroovyToken>
-
getPreviousComment
public GroovyToken getPreviousComment()
- Specified by:
getPreviousComment
in interfaceGenericToken<GroovyToken>
-
getImageCs
public CharSequence getImageCs()
- Specified by:
getImageCs
in interfaceGenericToken<GroovyToken>
-
getRegion
public TextRegion getRegion()
Returns a text region with the coordinates of this token.- Specified by:
getRegion
in interfaceGenericToken<GroovyToken>
-
getReportLocation
public FileLocation getReportLocation()
- Specified by:
getReportLocation
in interfaceReportable
-
isEof
public boolean isEof()
- Specified by:
isEof
in interfaceGenericToken<GroovyToken>
-
compareTo
public int compareTo(GroovyToken o)
- Specified by:
compareTo
in interfaceComparable<GroovyToken>
- Specified by:
compareTo
in interfaceGenericToken<GroovyToken>
-
getKind
public int getKind()
- Specified by:
getKind
in interfaceGenericToken<GroovyToken>
-
isHidden
public boolean isHidden()
-
isDefault
public boolean isDefault()
-
-