com.puppycrawl.tools.checkstyle.checks.coding
Class SuperCloneCheck

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 com.puppycrawl.tools.checkstyle.checks.coding.AbstractSuperCheck
                  extended by com.puppycrawl.tools.checkstyle.checks.coding.SuperCloneCheck
All Implemented Interfaces:
Configurable, Contextualizable

public class SuperCloneCheck
extends AbstractSuperCheck

Checks that an overriding clone() method invokes super.clone().

Reference: Object.clone.

An example of how to configure the check is:

 <module name="SuperClone"/>
 

Author:
Rick Giles

Constructor Summary
SuperCloneCheck()
           
 
Method Summary
protected  String getMethodName()
          Returns the name of the overriding method.
 
Methods inherited from class com.puppycrawl.tools.checkstyle.checks.coding.AbstractSuperCheck
beginTree, getDefaultTokens, leaveToken, visitToken
 
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
getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, 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

SuperCloneCheck

public SuperCloneCheck()
Method Detail

getMethodName

protected String getMethodName()
Returns the name of the overriding method.

Specified by:
getMethodName in class AbstractSuperCheck
Returns:
the name of the overriding method.

Back to the Checkstyle Home Page