Class AntlrTokenFilter

  • All Implemented Interfaces:

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

      • AntlrTokenFilter

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

      • shouldStopProcessing

        protected boolean shouldStopProcessing​(AntlrToken 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<AntlrToken>
        currentToken - The token to be analyzed
        True if the token filter has finished consuming all tokens, false otherwise