Class GroovyToken
- java.lang.Object
-
- net.sourceforge.pmd.lang.groovy.ast.impl.antlr4.GroovyToken
-
- All Implemented Interfaces:
Comparable<GroovyToken>,net.sourceforge.pmd.lang.ast.GenericToken<GroovyToken>,net.sourceforge.pmd.reporting.Reportable
public class GroovyToken extends Object implements net.sourceforge.pmd.lang.ast.GenericToken<GroovyToken>
A Groovy specific token representation. This is simply a copy ofAntlrTokenbut referencing the jarjared version of antlr4 used by the groovy lexer.
-
-
Constructor Summary
Constructors Constructor Description GroovyToken(groovyjarjarantlr4.v4.runtime.Token token, GroovyToken previousComment, net.sourceforge.pmd.lang.document.TextDocument textDoc)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(GroovyToken o)CharSequencegetImageCs()intgetKind()GroovyTokengetNext()GroovyTokengetPreviousComment()net.sourceforge.pmd.lang.document.TextRegiongetRegion()Returns a text region with the coordinates of this token.net.sourceforge.pmd.lang.document.FileLocationgetReportLocation()booleanisDefault()booleanisEof()booleanisHidden()
-
-
-
Constructor Detail
-
GroovyToken
public GroovyToken(groovyjarjarantlr4.v4.runtime.Token token, GroovyToken previousComment, net.sourceforge.pmd.lang.document.TextDocument textDoc)Constructor- Parameters:
token- The antlr token implementationpreviousComment- The previous commenttextDoc- The text document
-
-
Method Detail
-
getNext
public GroovyToken getNext()
- Specified by:
getNextin interfacenet.sourceforge.pmd.lang.ast.GenericToken<GroovyToken>
-
getPreviousComment
public GroovyToken getPreviousComment()
- Specified by:
getPreviousCommentin interfacenet.sourceforge.pmd.lang.ast.GenericToken<GroovyToken>
-
getImageCs
public CharSequence getImageCs()
- Specified by:
getImageCsin interfacenet.sourceforge.pmd.lang.ast.GenericToken<GroovyToken>
-
getRegion
public net.sourceforge.pmd.lang.document.TextRegion getRegion()
Returns a text region with the coordinates of this token.- Specified by:
getRegionin interfacenet.sourceforge.pmd.lang.ast.GenericToken<GroovyToken>
-
getReportLocation
public net.sourceforge.pmd.lang.document.FileLocation getReportLocation()
- Specified by:
getReportLocationin interfacenet.sourceforge.pmd.reporting.Reportable
-
isEof
public boolean isEof()
- Specified by:
isEofin interfacenet.sourceforge.pmd.lang.ast.GenericToken<GroovyToken>
-
compareTo
public int compareTo(GroovyToken o)
- Specified by:
compareToin interfaceComparable<GroovyToken>- Specified by:
compareToin interfacenet.sourceforge.pmd.lang.ast.GenericToken<GroovyToken>
-
getKind
public int getKind()
- Specified by:
getKindin interfacenet.sourceforge.pmd.lang.ast.GenericToken<GroovyToken>
-
isHidden
public boolean isHidden()
-
isDefault
public boolean isDefault()
-
-