Class TokenDocument<T extends GenericToken<T>>

java.lang.Object
net.sourceforge.pmd.lang.ast.impl.TokenDocument<T>
Direct Known Subclasses:
JavaccTokenDocument

public abstract class TokenDocument<T extends GenericToken<T>> extends Object
Token layer of a parsed file. This object is used to store state global to all tokens of a single file, e.g. the text document. Not all languages currently have an implementation of a token document.
See Also:
  • Constructor Details

    • TokenDocument

      public TokenDocument(TextDocument textDocument)
  • Method Details

    • 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