Class AbstractNestedDepthCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    @Deprecated
    public abstract class AbstractNestedDepthCheck
    extends AbstractCheck
    Deprecated.
    Checkstyle will not support abstract checks anymore. Use AbstractCheck instead.
    Abstract class which provides helpers functionality for nested checks.
    • Field Detail

      • max

        private int max
        Deprecated.
        Maximum allowed nesting depth.
      • depth

        private int depth
        Deprecated.
        Current nesting depth.
    • Constructor Detail

      • AbstractNestedDepthCheck

        protected AbstractNestedDepthCheck​(int max)
        Deprecated.
        Creates new instance of checks.
        Parameters:
        max - default allowed nesting depth.
    • Method Detail

      • getRequiredTokens

        public final int[] getRequiredTokens()
        Deprecated.
        Description copied from class: AbstractCheck
        The tokens that this check must be registered for.
        Specified by:
        getRequiredTokens in class AbstractCheck
        Returns:
        the token set this must be registered for.
        See Also:
        TokenTypes
      • beginTree

        public void beginTree​(DetailAST rootAST)
        Deprecated.
        Description copied from class: AbstractCheck
        Called before the starting to process a tree. Ideal place to initialize information that is to be collected whilst processing a tree.
        Overrides:
        beginTree in class AbstractCheck
        Parameters:
        rootAST - the root of the tree
      • setMax

        public final void setMax​(int max)
        Deprecated.
        Setter for maximum allowed nesting depth.
        Parameters:
        max - maximum allowed nesting depth.
      • nestIn

        protected final void nestIn​(DetailAST ast,
                                    java.lang.String messageId)
        Deprecated.
        Increasing current nesting depth.
        Parameters:
        ast - note which increases nesting.
        messageId - message id for logging error.
      • nestOut

        protected final void nestOut()
        Deprecated.
        Decreasing current nesting depth.