com.puppycrawl.tools.checkstyle.checks.coding

Class AbstractSuperCheck

Implemented Interfaces:
Configurable, Contextualizable
Known Direct Subclasses:
SuperCloneCheck, SuperFinalizeCheck

public abstract class AbstractSuperCheck
extends Check

Abstract class for checking that an overriding method with no parameters invokes the super method.
Author:
Rick Giles

Method Summary

void
beginTree(DetailAST aRootAST)
int[]
getDefaultTokens()
protected abstract String
getMethodName()
Returns the name of the overriding method.
void
leaveToken(DetailAST aAST)
void
visitToken(DetailAST aAST)

Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check

beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter

getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, 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

Method Details

beginTree

public void beginTree(DetailAST aRootAST)
Overrides:
beginTree in interface Check

getDefaultTokens

public int[] getDefaultTokens()
Overrides:
getDefaultTokens in interface Check

getMethodName

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

leaveToken

public void leaveToken(DetailAST aAST)
Overrides:
leaveToken in interface Check

visitToken

public void visitToken(DetailAST aAST)
Overrides:
visitToken in interface Check