public abstract class AbstractComplexityCheck extends Check
| Constructor and Description |
|---|
AbstractComplexityCheck(int aMax)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected BigInteger |
getCurrentValue() |
int |
getMax() |
protected abstract String |
getMessageID() |
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
protected void |
incrementCurrentValue(BigInteger 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 BigInteger |
popValue() |
protected void |
pushValue()
Push the current value on the stack
|
protected void |
setCurrentValue(BigInteger 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.
|
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLine, getLines, getTabWidth, getTokenNames, init, isCommentNodesRequired, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokensgetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic AbstractComplexityCheck(int aMax)
aMax - the threshold of when to report an errorprotected abstract String getMessageID()
protected void visitTokenHook(DetailAST aAST)
aAST - the token being visitedprotected void leaveTokenHook(DetailAST aAST)
aAST - the token being leftpublic final int[] getRequiredTokens()
CheckgetRequiredTokens in class CheckTokenTypespublic final int getMax()
public final void setMax(int aMax)
aMax - the maximum thresholdpublic void visitToken(DetailAST aAST)
CheckvisitToken in class CheckaAST - the token to processpublic void leaveToken(DetailAST aAST)
CheckleaveToken in class CheckaAST - the token leavingprotected final BigInteger getCurrentValue()
protected final void setCurrentValue(BigInteger aValue)
aValue - the new valueprotected final void incrementCurrentValue(BigInteger aBy)
aBy - the amount to increment byprotected final void pushValue()
protected final BigInteger popValue()
Copyright © 2001-2014. All Rights Reserved.