Class TokenDocument<T extends GenericToken>
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.impl.TokenDocument<T>
-
- Direct Known Subclasses:
JavaccTokenDocument
public abstract class TokenDocument<T extends GenericToken> extends Object
Token layer of a parsed file.
-
-
Constructor Summary
Constructors Constructor Description TokenDocument(TextDocument textDocument)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract T
getFirstToken()
Returns the first token of the token chain.Chars
getFullText()
Returns the original text of the file (without escaping).TextDocument
getTextDocument()
-
-
-
Constructor Detail
-
TokenDocument
public TokenDocument(TextDocument textDocument)
-
-
Method Detail
-
getFullText
public Chars getFullText()
Returns the original text of the file (without escaping).
-
getTextDocument
public TextDocument getTextDocument()
-
getFirstToken
public abstract T getFirstToken()
Returns the first token of the token chain.- Throws:
IllegalStateException
- If the document has not been parsed yet
-
-