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. UseAbstractCheckinstead.Abstract class which provides helpers functionality for nested checks.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractNestedDepthCheck(int max)Deprecated.Creates new instance of checks.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidbeginTree(DetailAST rootAST)Deprecated.Called before the starting to process a tree.int[]getRequiredTokens()Deprecated.The tokens that this check must be registered for.protected voidnestIn(DetailAST ast, java.lang.String messageId)Deprecated.Increasing current nesting depth.protected voidnestOut()Deprecated.Decreasing current nesting depth.voidsetMax(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
-
-
-
-
Method Detail
-
getRequiredTokens
public final int[] getRequiredTokens()
Deprecated.Description copied from class:AbstractCheckThe tokens that this check must be registered for.- Specified by:
getRequiredTokensin classAbstractCheck- Returns:
- the token set this must be registered for.
- See Also:
TokenTypes
-
beginTree
public void beginTree(DetailAST rootAST)
Deprecated.Description copied from class:AbstractCheckCalled before the starting to process a tree. Ideal place to initialize information that is to be collected whilst processing a tree.- Overrides:
beginTreein 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, 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.
-
-