Class JavaCCTokenFilter

  • All Implemented Interfaces:

    public class JavaCCTokenFilter
    extends net.sourceforge.pmd.cpd.token.internal.BaseTokenFilter<GenericToken>
    A generic filter for JavaCC-based token managers that allows to use comments to enable / disable analysis of parts of the stream
    • Constructor Detail

      • JavaCCTokenFilter

        public JavaCCTokenFilter​(TokenManager tokenManager)
        Creates a new JavaCCTokenFilter
        tokenManager - The token manager from which to retrieve tokens to be filtered
    • Method Detail

      • shouldStopProcessing

        protected boolean shouldStopProcessing​(GenericToken currentToken)
        Description copied from class: net.sourceforge.pmd.cpd.token.internal.BaseTokenFilter
        Extension point for subclasses to indicate when to stop filtering tokens.
        Specified by:
        shouldStopProcessing in class net.sourceforge.pmd.cpd.token.internal.BaseTokenFilter<GenericToken>
        currentToken - The token to be analyzed
        True if the token filter has finished consuming all tokens, false otherwise