AbstractCheck
instead.@Deprecated public abstract class AbstractComplexityCheck extends AbstractCheck
Modifier and Type | Field and Description |
---|---|
private java.math.BigInteger |
currentValue
Deprecated.
The current value.
|
private static java.math.BigInteger |
INITIAL_VALUE
Deprecated.
The initial current value.
|
private int |
max
Deprecated.
Threshold to report error for.
|
private java.util.Deque<java.math.BigInteger> |
valueStack
Deprecated.
Stack of values - all but the current value.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractComplexityCheck(int max)
Deprecated.
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
protected java.math.BigInteger |
getCurrentValue()
Deprecated.
Gets the current value.
|
protected abstract java.lang.String |
getMessageID()
Deprecated.
Gets the message ID to log violations with.
|
int[] |
getRequiredTokens()
Deprecated.
The tokens that this check must be registered for.
|
protected void |
incrementCurrentValue(java.math.BigInteger amount)
Deprecated.
Increments the current value by a specified amount.
|
private void |
leaveMethodDef(DetailAST ast)
Deprecated.
Process the end of a method definition.
|
void |
leaveToken(DetailAST ast)
Deprecated.
Called after all the child nodes have been process.
|
protected abstract void |
leaveTokenHook(DetailAST ast)
Deprecated.
Hook called when leaving a token.
|
protected java.math.BigInteger |
popValue()
Deprecated.
Pops a value off the stack and makes it the current value.
|
protected void |
pushValue()
Deprecated.
Push the current value on the stack.
|
protected void |
setCurrentValue(java.math.BigInteger value)
Deprecated.
Set the current value.
|
void |
setMax(int max)
Deprecated.
Set the maximum threshold allowed.
|
private void |
visitMethodDef()
Deprecated.
Process the start of the method definition.
|
void |
visitToken(DetailAST ast)
Deprecated.
Called to process a token.
|
protected abstract void |
visitTokenHook(DetailAST ast)
Deprecated.
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, setTokens
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
private static final java.math.BigInteger INITIAL_VALUE
private final java.util.Deque<java.math.BigInteger> valueStack
private java.math.BigInteger currentValue
private int max
protected AbstractComplexityCheck(int max)
max
- the threshold of when to report an errorprotected abstract java.lang.String getMessageID()
protected abstract void visitTokenHook(DetailAST ast)
ast
- the token being visitedprotected abstract void leaveTokenHook(DetailAST ast)
ast
- the token being leftpublic final int[] getRequiredTokens()
AbstractCheck
getRequiredTokens
in class AbstractCheck
TokenTypes
public final void setMax(int max)
max
- the maximum thresholdpublic void visitToken(DetailAST ast)
AbstractCheck
visitToken
in class AbstractCheck
ast
- the token to processpublic void leaveToken(DetailAST ast)
AbstractCheck
leaveToken
in class AbstractCheck
ast
- the token leavingprotected final java.math.BigInteger getCurrentValue()
protected final void setCurrentValue(java.math.BigInteger value)
value
- the new valueprotected final void incrementCurrentValue(java.math.BigInteger amount)
amount
- the amount to increment byprotected final void pushValue()
protected final java.math.BigInteger popValue()
private void visitMethodDef()
private void leaveMethodDef(DetailAST ast)
ast
- the token representing the method definition