public final class NestedIfDepthCheck extends Check
Modifier and Type | Field and Description |
---|---|
static String |
MSG_KEY
A key is pointing to the warning message text in "messages.properties"
file.
|
Constructor and Description |
---|
NestedIfDepthCheck() |
Modifier and Type | Method and Description |
---|---|
void |
beginTree(DetailAST rootAST)
Called before the starting to process a tree.
|
int[] |
getAcceptableTokens()
The configurable token set.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
void |
leaveToken(DetailAST literalIf)
Called after all the child nodes have been process.
|
void |
setMax(int max)
Setter for maximum allowed nesting depth.
|
void |
visitToken(DetailAST literalIf)
Called to process a token.
|
destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getTabWidth, getTokenNames, init, isCommentNodesRequired, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public static final String MSG_KEY
public void setMax(int max)
max
- maximum allowed nesting depth.public int[] getDefaultTokens()
Check
getDefaultTokens
in class Check
TokenTypes
public int[] getAcceptableTokens()
Check
getAcceptableTokens
in class Check
TokenTypes
public int[] getRequiredTokens()
Check
getRequiredTokens
in class Check
TokenTypes
public void beginTree(DetailAST rootAST)
Check
public void visitToken(DetailAST literalIf)
Check
visitToken
in class Check
literalIf
- the token to processpublic void leaveToken(DetailAST literalIf)
Check
leaveToken
in class Check
literalIf
- the token leavingCopyright © 2001–2022. All rights reserved.