public abstract class AbstractNestedDepthCheck extends Check
Constructor and Description |
---|
AbstractNestedDepthCheck(int aMax)
Creates new instance of checks.
|
Modifier and Type | Method and Description |
---|---|
void |
beginTree(DetailAST aRootAST)
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 aAST,
String aMessageId)
Increasing current nesting depth.
|
protected void |
nestOut()
Decreasing current nesting depth
|
void |
setMax(int aMax)
Setter for maximum allowed nesting depth.
|
destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken
getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public AbstractNestedDepthCheck(int aMax)
aMax
- default allowed nesting depth.public final int[] getRequiredTokens()
getRequiredTokens
in class Check
TokenTypes
public void beginTree(DetailAST aRootAST)
public final int getMax()
public final void setMax(int aMax)
aMax
- maximum allowed nesting depth.protected final void nestIn(DetailAST aAST, String aMessageId)
aAST
- note which increases nesting.aMessageId
- message id for logging error.protected final void nestOut()