Class AbstractIllegalMethodCheck
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.api.AutomaticBean
-
- com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
-
- com.puppycrawl.tools.checkstyle.api.AbstractCheck
-
- com.puppycrawl.tools.checkstyle.checks.coding.AbstractIllegalMethodCheck
-
- All Implemented Interfaces:
Configurable
,Contextualizable
@Deprecated public abstract class AbstractIllegalMethodCheck extends AbstractCheck
Deprecated.Checkstyle will not support abstract checks anymore. UseAbstractCheck
instead.Provide support for checking for a method with a specified name and no arguments.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
errorKey
Deprecated.The error key to report with.private java.lang.String
methodName
Deprecated.Name of method to disallow.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractIllegalMethodCheck(java.lang.String methodName, java.lang.String errorKey)
Deprecated.Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int[]
getAcceptableTokens()
Deprecated.The configurable token set.int[]
getDefaultTokens()
Deprecated.Returns the default token a check is interested in.int[]
getRequiredTokens()
Deprecated.The tokens that this check must be registered for.void
visitToken(DetailAST aAST)
Deprecated.Called to process a token.-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractCheck
beginTree, destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
-
-
-
-
Method Detail
-
getDefaultTokens
public int[] getDefaultTokens()
Deprecated.Description copied from class:AbstractCheck
Returns the default token a check is interested in. Only used if the configuration for a check does not define the tokens.- Specified by:
getDefaultTokens
in classAbstractCheck
- Returns:
- the default tokens
- See Also:
TokenTypes
-
getAcceptableTokens
public int[] getAcceptableTokens()
Deprecated.Description copied from class:AbstractCheck
The configurable token set. Used to protect Checks against malicious users who specify an unacceptable token set in the configuration file. The default implementation returns the check's default tokens.- Specified by:
getAcceptableTokens
in classAbstractCheck
- Returns:
- the token set this check is designed for.
- See Also:
TokenTypes
-
getRequiredTokens
public int[] getRequiredTokens()
Deprecated.Description copied from class:AbstractCheck
The tokens that this check must be registered for.- Specified by:
getRequiredTokens
in classAbstractCheck
- Returns:
- the token set this must be registered for.
- See Also:
TokenTypes
-
visitToken
public void visitToken(DetailAST aAST)
Deprecated.Description copied from class:AbstractCheck
Called to process a token.- Overrides:
visitToken
in classAbstractCheck
- Parameters:
aAST
- the token to process
-
-