public class CyclomaticComplexityCheck extends AbstractComplexityCheck
Check has following properties:
switchBlockAsSingleDecisionPoint - controls whether to treat the whole switch block as a single decision point. Default value is false
| Modifier and Type | Field and Description |
|---|---|
static String |
MSG_KEY
A key is pointing to the warning message text in "messages.properties"
file.
|
| Constructor and Description |
|---|
CyclomaticComplexityCheck()
Create an instance.
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
getAcceptableTokens()
The configurable token set.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
protected String |
getMessageID()
Gets the message ID to log violations with.
|
void |
setSwitchBlockAsSingleDecisionPoint(boolean switchBlockAsSingleDecisionPoint)
Sets whether to treat the whole switch block as a single decision point.
|
protected void |
visitTokenHook(DetailAST ast)
Hook called when visiting a token.
|
getCurrentValue, getRequiredTokens, incrementCurrentValue, leaveToken, leaveTokenHook, popValue, pushValue, setCurrentValue, setMax, visitTokenbeginTree, destroy, finishTree, getClassLoader, 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 static final String MSG_KEY
public CyclomaticComplexityCheck()
public void setSwitchBlockAsSingleDecisionPoint(boolean switchBlockAsSingleDecisionPoint)
switchBlockAsSingleDecisionPoint - whether to treat the whole switch
block as a single decision point.public int[] getDefaultTokens()
CheckgetDefaultTokens in class CheckTokenTypespublic int[] getAcceptableTokens()
CheckgetAcceptableTokens in class CheckTokenTypesprotected final void visitTokenHook(DetailAST ast)
AbstractComplexityCheckvisitTokenHook in class AbstractComplexityCheckast - the token being visitedprotected final String getMessageID()
AbstractComplexityCheckgetMessageID in class AbstractComplexityCheckCopyright © 2001-2015. All Rights Reserved.