com.puppycrawl.tools.checkstyle.checks.coding
Class AbstractNestedDepthCheck
- Configurable, Contextualizable
public abstract class AbstractNestedDepthCheck
Abstract class which provides helpers functionality for nestedchecks.
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, 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, log, log, setId, setSeverity |
AbstractNestedDepthCheck
public AbstractNestedDepthCheck(int aMax)
Creates new instance of checks.
aMax - default allowed nesting depth.
getMax
public final int getMax()
Getter for maximum allowed nesting depth.
- maximum allowed nesting depth.
nestIn
protected final void nestIn(DetailAST aAST,
String aMessageId) Increasing current nesting depth.
aAST - note which increases nesting.aMessageId - message id for logging error.
nestOut
protected final void nestOut()
Decreasing current nesting depth
setMax
public final void setMax(int aMax)
Setter for maximum allowed nesting depth.
aMax - maximum allowed nesting depth.