Class AbstractNestedDepthCheck
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.api.AutomaticBean
-
- com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
-
- com.puppycrawl.tools.checkstyle.api.AbstractCheck
-
- com.puppycrawl.tools.checkstyle.checks.coding.AbstractNestedDepthCheck
-
- All Implemented Interfaces:
Configurable
,Contextualizable
@Deprecated public abstract class AbstractNestedDepthCheck extends AbstractCheck
Deprecated.Checkstyle will not support abstract checks anymore. UseAbstractCheck
instead.Abstract class which provides helpers functionality for nested checks.- Author:
- Simon Harris
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNestedDepthCheck(int max)
Deprecated.Creates new instance of checks.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
beginTree(DetailAST rootAST)
Deprecated.Called before the starting to process a tree.int[]
getRequiredTokens()
Deprecated.The tokens that this check must be registered for.protected void
nestIn(DetailAST ast, String messageId)
Deprecated.Increasing current nesting depth.protected void
nestOut()
Deprecated.Decreasing current nesting depth.void
setMax(int max)
Deprecated.Setter for maximum allowed nesting depth.-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractCheck
destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLine, getLines, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
-
-
-
-
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 classAbstractCheck
- 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 classAbstractCheck
- 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, 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.
-
-