org.xwiki.tool.checkstyle
Class AbstractXWikiClassCouplingCheck

java.lang.Object
  extended by com.puppycrawl.tools.checkstyle.api.AutomaticBean
      extended by com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
          extended by com.puppycrawl.tools.checkstyle.api.Check
              extended by 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:

Since:
5.0M1
Version:
$Id: 175fcb7aae6d13d476299b0df4b8bf5e6577a594 $

Constructor Summary
protected AbstractXWikiClassCouplingCheck(int aDefaultMax)
          Creates new instance of the check.
 
Method Summary
 void beginTree(com.puppycrawl.tools.checkstyle.api.DetailAST aAST)
           
 int[] getDefaultTokens()
           
protected abstract  String getLogMessageId()
           
 int getMax()
           
 void leaveToken(com.puppycrawl.tools.checkstyle.api.DetailAST aAST)
           
 void setMax(int aMax)
          Sets maximul allowed complexity.
 void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST aAST)
           
 
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
 

Constructor Detail

AbstractXWikiClassCouplingCheck

protected AbstractXWikiClassCouplingCheck(int aDefaultMax)
Creates new instance of the check.

Parameters:
aDefaultMax - default value for allowed complexity.
Method Detail

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.