public abstract class AbstractNestedDepthCheck extends Check
| Constructor and Description |
|---|
AbstractNestedDepthCheck(int max)
Creates new instance of checks.
|
| Modifier and Type | Method and Description |
|---|---|
void |
beginTree(DetailAST rootAST)
Called before the starting to process a tree.
|
int |
getMax()
Getter for maximum allowed nesting depth.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
protected void |
nestIn(DetailAST ast,
String messageId)
Increasing current nesting depth.
|
protected void |
nestOut()
Decreasing current nesting depth
|
void |
setMax(int max)
Setter for maximum allowed nesting depth.
|
destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLine, getLines, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitTokengetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic AbstractNestedDepthCheck(int max)
max - default allowed nesting depth.public final int[] getRequiredTokens()
CheckgetRequiredTokens in class CheckTokenTypespublic void beginTree(DetailAST rootAST)
Checkpublic final int getMax()
public final void setMax(int max)
max - maximum allowed nesting depth.protected final void nestIn(DetailAST ast, String messageId)
ast - note which increases nesting.messageId - message id for logging error.protected final void nestOut()
Copyright © 2001–2015. All rights reserved.