public abstract class AbstractClassCouplingCheck extends AbstractCheck
AutomaticBean.OutputStreamOptions
Modifier | Constructor and Description |
---|---|
protected |
AbstractClassCouplingCheck(int defaultMax)
Creates new instance of the check.
|
Modifier and Type | Method and Description |
---|---|
void |
beginTree(DetailAST ast)
Called before the starting to process a tree.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
protected abstract String |
getLogMessageId()
Returns message key we use for log violations.
|
void |
leaveToken(DetailAST ast)
Called after all the child nodes have been process.
|
void |
setExcludeClassesRegexps(String... from)
Sets user-excluded regular expression of classes to ignore.
|
void |
setExcludedClasses(String... excludedClasses)
Sets user-excluded classes to ignore.
|
void |
setExcludedPackages(String... excludedPackages)
Sets user-excluded packages to ignore.
|
void |
setMax(int max)
Sets maximum allowed complexity.
|
void |
visitToken(DetailAST ast)
Called to process a token.
|
clearMessages, destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLine, getLines, getMessages, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, log, log, log, setClassLoader, setFileContents, setTabWidth, setTokens
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
configure, contextualize, getConfiguration, setupChild
protected AbstractClassCouplingCheck(int defaultMax)
defaultMax
- default value for allowed complexity.protected abstract String getLogMessageId()
public final int[] getDefaultTokens()
AbstractCheck
getDefaultTokens
in class AbstractCheck
TokenTypes
public final void setMax(int max)
max
- allowed complexity.public final void setExcludedClasses(String... excludedClasses)
excludedClasses
- the list of classes to ignore.public void setExcludeClassesRegexps(String... from)
from
- array representing regular expressions of classes to ignore.public final void setExcludedPackages(String... excludedPackages)
excludedPackages
- the list of packages to ignore.public final void beginTree(DetailAST ast)
AbstractCheck
beginTree
in class AbstractCheck
ast
- the root of the treepublic 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 leavingCopyright © 2001–2018. All rights reserved.