public class SuperCloneCheck extends AbstractSuperCheck
Checks that an overriding clone() method invokes super.clone(). Does not check native methods, as they have no possible java defined implementation.
Reference: Object.clone.
An example of how to configure the check is:
<module name="SuperClone"/>
AutomaticBean.OutputStreamOptions
MSG_KEY
Constructor and Description |
---|
SuperCloneCheck() |
Modifier and Type | Method and Description |
---|---|
protected String |
getMethodName()
Returns the name of the overriding method.
|
beginTree, getAcceptableTokens, getDefaultTokens, getRequiredTokens, leaveToken, visitToken
clearMessages, destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, isCommentNodesRequired, log, log, log, setClassLoader, setFileContents, setTabWidth, setTokens
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
configure, contextualize, getConfiguration, setupChild
public SuperCloneCheck()
protected String getMethodName()
AbstractSuperCheck
getMethodName
in class AbstractSuperCheck
Copyright © 2001–2018. All rights reserved.