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 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, TextDocument textDoc)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(GroovyToken o)CharSequencegetImageCs()intgetKind()GroovyTokengetNext()GroovyTokengetPreviousComment()TextRegiongetRegion()Returns a text region with the coordinates of this token.FileLocationgetReportLocation()booleanisDefault()booleanisEof()booleanisHidden()-
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:
getNextin interfaceGenericToken<GroovyToken>
-
getPreviousComment
public GroovyToken getPreviousComment()
- Specified by:
getPreviousCommentin interfaceGenericToken<GroovyToken>
-
getImageCs
public CharSequence getImageCs()
- Specified by:
getImageCsin interfaceGenericToken<GroovyToken>
-
getRegion
public TextRegion getRegion()
Returns a text region with the coordinates of this token.- Specified by:
getRegionin interfaceGenericToken<GroovyToken>
-
getReportLocation
public FileLocation getReportLocation()
- Specified by:
getReportLocationin interfaceReportable
-
isEof
public boolean isEof()
- Specified by:
isEofin interfaceGenericToken<GroovyToken>
-
compareTo
public int compareTo(GroovyToken o)
- Specified by:
compareToin interfaceComparable<GroovyToken>- Specified by:
compareToin interfaceGenericToken<GroovyToken>
-
getKind
public int getKind()
- Specified by:
getKindin interfaceGenericToken<GroovyToken>
-
isHidden
public boolean isHidden()
-
isDefault
public boolean isDefault()
-
-