Package net.sourceforge.pmd.cpd
Interface CpdLexer
- All Known Implementing Classes:
AntlrCpdLexer,AnyCpdLexer,CpdLexerBase,JavaccCpdLexer
public interface CpdLexer
Tokenizes a source file into tokens consumable by CPD.
Note: This interface has been called Tokenizer in PMD 6.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Tokenstokenize(CpdLexer cpdLexer, TextDocument textDocument) static voidtokenize(CpdLexer cpdLexer, TextDocument textDocument, Tokens tokens) Wraps a call totokenize(TextDocument, TokenFactory)to properly create and close the token factory.voidtokenize(TextDocument document, TokenFactory tokens) Tokenize the source code and record tokens using the provided token factory.
-
Method Details
-
tokenize
Tokenize the source code and record tokens using the provided token factory.- Throws:
IOException
-
tokenize
static void tokenize(CpdLexer cpdLexer, TextDocument textDocument, Tokens tokens) throws IOException Wraps a call totokenize(TextDocument, TokenFactory)to properly create and close the token factory.- Throws:
IOException
-
tokenize
- Throws:
IOException
-