Class SuperFinalizeCheck
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.AbstractAutomaticBean
-
- com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
-
- com.puppycrawl.tools.checkstyle.api.AbstractCheck
-
- com.puppycrawl.tools.checkstyle.checks.coding.AbstractSuperCheck
-
- com.puppycrawl.tools.checkstyle.checks.coding.SuperFinalizeCheck
-
- All Implemented Interfaces:
Configurable
,Contextualizable
public class SuperFinalizeCheck extends AbstractSuperCheck
Checks that an overridingfinalize()
method invokessuper.finalize()
. Does not check native methods, as they have no possible java defined implementation.References: How to Handle Java Finalization's Memory-Retention Issues; 10 points on finalize method in Java.
Parent is
com.puppycrawl.tools.checkstyle.TreeWalker
Violation Message Keys:
-
missing.super.call
- Since:
- 3.2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.AbstractAutomaticBean
AbstractAutomaticBean.OutputStreamOptions
-
-
Field Summary
-
Fields inherited from class com.puppycrawl.tools.checkstyle.checks.coding.AbstractSuperCheck
MSG_KEY
-
-
Constructor Summary
Constructors Constructor Description SuperFinalizeCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getMethodName()
Returns the name of the overriding method.-
Methods inherited from class com.puppycrawl.tools.checkstyle.checks.coding.AbstractSuperCheck
beginTree, getAcceptableTokens, getDefaultTokens, getRequiredTokens, leaveToken, visitToken
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractCheck
clearViolations, destroy, finishTree, getFileContents, getFilePath, getLine, getLineCodePoints, getLines, getTabWidth, getTokenNames, getViolations, init, isCommentNodesRequired, log, log, log, setFileContents, setTabWidth, setTokens
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
-
Methods inherited from class com.puppycrawl.tools.checkstyle.AbstractAutomaticBean
configure, contextualize, getConfiguration, setupChild
-
-
-
-
Constructor Detail
-
SuperFinalizeCheck
public SuperFinalizeCheck()
-
-
Method Detail
-
getMethodName
protected String getMethodName()
Description copied from class:AbstractSuperCheck
Returns the name of the overriding method.- Specified by:
getMethodName
in classAbstractSuperCheck
- Returns:
- the name of the overriding method.
-
-