Package net.sourceforge.pmd.cpd.impl
Class CpdLexerBase<T extends GenericToken<T>>
- java.lang.Object
-
- net.sourceforge.pmd.cpd.impl.CpdLexerBase<T>
-
- All Implemented Interfaces:
CpdLexer
- Direct Known Subclasses:
AntlrCpdLexer,JavaccCpdLexer
public abstract class CpdLexerBase<T extends GenericToken<T>> extends Object implements CpdLexer
Generic base class for aCpdLexer.
-
-
Constructor Summary
Constructors Constructor Description CpdLexerBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected TokenManager<T>filterTokenStream(TokenManager<T> tokenManager)protected StringgetImage(T token)protected abstract TokenManager<T>makeLexerImpl(TextDocument doc)protected voidprocessToken(TokenFactory tokenEntries, T currentToken)voidtokenize(TextDocument document, TokenFactory tokens)Tokenize the source code and record tokens using the provided token factory.
-
-
-
Method Detail
-
makeLexerImpl
protected abstract TokenManager<T> makeLexerImpl(TextDocument doc) throws IOException
- Throws:
IOException
-
filterTokenStream
protected TokenManager<T> filterTokenStream(TokenManager<T> tokenManager)
-
processToken
protected void processToken(TokenFactory tokenEntries, T currentToken)
-
tokenize
public final void tokenize(TextDocument document, TokenFactory tokens) throws IOException
Description copied from interface:CpdLexerTokenize the source code and record tokens using the provided token factory.- Specified by:
tokenizein interfaceCpdLexer- Throws:
IOException
-
-