org.xwiki.tool.checkstyle
Class AbstractXWikiClassCouplingCheck
java.lang.Object
com.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.Check
org.xwiki.tool.checkstyle.AbstractXWikiClassCouplingCheck
- All Implemented Interfaces:
- com.puppycrawl.tools.checkstyle.api.Configurable, com.puppycrawl.tools.checkstyle.api.Contextualizable
- Direct Known Subclasses:
- XWikiClassFanOutComplexityCheck
public abstract class AbstractXWikiClassCouplingCheck
- extends com.puppycrawl.tools.checkstyle.api.Check
Base class for coupling calculation.
Copied from the Checkstyle source (because it cannot be extended, see
https://sourceforge.net/p/checkstyle/feature-requests/575/) to fix the following issues:
- https://sourceforge.net/p/checkstyle/feature-requests/607/
- https://sourceforge.net/p/checkstyle/bugs/684/
- Since:
- 5.0M1
- Version:
- $Id: 175fcb7aae6d13d476299b0df4b8bf5e6577a594 $
| Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check |
destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens |
| Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter |
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity |
| Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean |
configure, contextualize, finishLocalSetup, getConfiguration, setupChild |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractXWikiClassCouplingCheck
protected AbstractXWikiClassCouplingCheck(int aDefaultMax)
- Creates new instance of the check.
- Parameters:
aDefaultMax - default value for allowed complexity.
getDefaultTokens
public final int[] getDefaultTokens()
- Specified by:
getDefaultTokens in class com.puppycrawl.tools.checkstyle.api.Check
getMax
public final int getMax()
- Returns:
- allowed complexity.
setMax
public final void setMax(int aMax)
- Sets maximul allowed complexity.
- Parameters:
aMax - allowed complexity.
beginTree
public final void beginTree(com.puppycrawl.tools.checkstyle.api.DetailAST aAST)
- Overrides:
beginTree in class com.puppycrawl.tools.checkstyle.api.Check
getLogMessageId
protected abstract String getLogMessageId()
- Returns:
- message key we use for log violations.
visitToken
public void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST aAST)
- Overrides:
visitToken in class com.puppycrawl.tools.checkstyle.api.Check
leaveToken
public void leaveToken(com.puppycrawl.tools.checkstyle.api.DetailAST aAST)
- Overrides:
leaveToken in class com.puppycrawl.tools.checkstyle.api.Check
Copyright © 2004-2013 XWiki. All Rights Reserved.