|
|||||||||||
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.metrics.AbstractComplexityCheck
Base class for checks the calculate complexity based around methods.
Constructor Summary | |
AbstractComplexityCheck(int aMax)
Creates an instance. |
Method Summary | |
protected int |
getCurrentValue()
|
int |
getMax()
|
protected abstract java.lang.String |
getMessageID()
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for. |
protected void |
incrementCurrentValue(int aBy)
Increments the current value by a specified amount. |
void |
leaveToken(DetailAST aAST)
Called after all the child nodes have been process. |
protected void |
leaveTokenHook(DetailAST aAST)
Hook called when leaving a token. |
protected int |
popValue()
|
protected void |
pushValue()
Push the current value on the stack |
protected void |
setCurrentValue(int aValue)
Set the current value |
void |
setMax(int aMax)
Set the maximum threshold allowed. |
void |
visitToken(DetailAST aAST)
Called to process a token. |
protected void |
visitTokenHook(DetailAST aAST)
Hook called when visiting a token. |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check |
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getTabWidth, getTokenNames, init, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens |
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 AbstractComplexityCheck(int aMax)
aMax
- the threshold of when to report an errorMethod Detail |
protected abstract java.lang.String getMessageID()
protected void visitTokenHook(DetailAST aAST)
aAST
- the token being visitedprotected void leaveTokenHook(DetailAST aAST)
aAST
- the token being leftpublic final int[] getRequiredTokens()
getRequiredTokens
in class Check
TokenTypes
public final int getMax()
public final void setMax(int aMax)
aMax
- the maximum thresholdpublic void visitToken(DetailAST aAST)
visitToken
in class Check
aAST
- the token to processpublic void leaveToken(DetailAST aAST)
leaveToken
in class Check
aAST
- the token leavingprotected final int getCurrentValue()
protected final void setCurrentValue(int aValue)
aValue
- the new valueprotected final void incrementCurrentValue(int aBy)
aBy
- the amount to increment byprotected final void pushValue()
protected final int popValue()
|
Back to the Checkstyle Home Page | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |