|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.puppycrawl.tools.checkstyle.api.AutomaticBean com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter com.puppycrawl.tools.checkstyle.api.Check com.puppycrawl.tools.checkstyle.checks.coding.AbstractNestedDepthCheck
Abstract class which provides helpers functionality for nestedchecks.
Constructor Summary | |
AbstractNestedDepthCheck(int aMax)
Creates new instance of checks. |
Method Summary | |
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,
java.lang.String aMessageId)
Increasing current nesting depth. |
protected void |
nestOut()
Decreasing current nesting depth |
void |
setMax(int aMax)
Setter for maximum allowed nesting depth. |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check |
destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter |
getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, setSeverity |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean |
configure, contextualize, finishLocalSetup, getConfiguration, setupChild |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractNestedDepthCheck(int aMax)
aMax
- default allowed nesting depth.Method Detail |
public final int[] getRequiredTokens()
Check
getRequiredTokens
in class Check
Check
public void beginTree(DetailAST aRootAST)
Check
beginTree
in class Check
aRootAST
- the root of the treeCheck
public final int getMax()
public final void setMax(int aMax)
aMax
- maximum allowed nesting depth.protected final void nestIn(DetailAST aAST, java.lang.String aMessageId)
aAST
- note which increases nesting.aMessageId
- message id for logging error.protected final void nestOut()
|
Back to the Checkstyle Home Page | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |