com.puppycrawl.tools.checkstyle.checks.coding

Class AbstractIllegalCheck

Implemented Interfaces:
Configurable, Contextualizable
Known Direct Subclasses:
IllegalCatchCheck, IllegalThrowsCheck

public abstract class AbstractIllegalCheck
extends Check

Support for checks that look for usage of illegal types.
Author:
Oliver Burn

Constructor Summary

AbstractIllegalCheck(String[] aInitialNames)
Constructs an object.

Method Summary

protected boolean
isIllegalClassName(String aIdent)
Checks if given class is illegal.
void
setIllegalClassNames(String[] aClassNames)
Set the list of illegal classes.

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

Constructor Details

AbstractIllegalCheck

protected AbstractIllegalCheck(String[] aInitialNames)
Constructs an object.
Parameters:
aInitialNames - the initial class names to treat as illegal

Method Details

isIllegalClassName

protected final boolean isIllegalClassName(String aIdent)
Checks if given class is illegal.
Parameters:
aIdent - ident to check.
Returns:
true if given ident is illegal.

setIllegalClassNames

public final void setIllegalClassNames(String[] aClassNames)
Set the list of illegal classes.
Parameters:
aClassNames - array of illegal exception classes