com.puppycrawl.tools.checkstyle.checks.metrics
public abstract class AbstractComplexityCheck extends Check
Constructor Summary | |
---|---|
AbstractComplexityCheck(int aMax)
Creates an instance. |
Method Summary | |
---|---|
protected int | getCurrentValue() |
int | getMax() |
protected abstract String | getMessageID() |
int[] | getRequiredTokens() {@inheritDoc} |
protected void | incrementCurrentValue(int aBy)
Increments the current value by a specified amount.
|
void | leaveToken(DetailAST aAST) {@inheritDoc} |
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) {@inheritDoc} |
protected void | visitTokenHook(DetailAST aAST)
Hook called when visiting a token. |
Parameters: aMax the threshold of when to report an error
Returns: the current value
Returns: the maximum threshold allowed
Returns: the message ID to log violations with
Parameters: aBy the amount to increment by
Parameters: aAST the token being left
Returns: pop a value off the stack and make it the current value
Parameters: aValue the new value
Parameters: aMax the maximum threshold
Parameters: aAST the token being visited