public class SuppressWarningsHolder extends AbstractCheck
SuppressWarnings
annotations.AutomaticBean.OutputStreamOptions
Modifier and Type | Field and Description |
---|---|
static String |
MSG_KEY
A key is pointing to the warning message text in "messages.properties"
file.
|
Constructor and Description |
---|
SuppressWarningsHolder() |
Modifier and Type | Method and Description |
---|---|
void |
beginTree(DetailAST rootAST)
Called before the starting to process a tree.
|
int[] |
getAcceptableTokens()
The configurable token set.
|
static String |
getAlias(String sourceName)
Returns the alias for the source name of a check.
|
static String |
getDefaultAlias(String sourceName)
Returns the default alias for the source name of a check, which is the
source name in lower case with any dotted prefix or "Check" suffix
removed.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
static boolean |
isSuppressed(AuditEvent event)
Checks for a suppression of a check with the given source name and
location in the last file processed.
|
void |
setAliasList(String... aliasList)
Registers a list of source name aliases based on a comma-separated list
of
source=alias items, such as com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck=
paramnum . |
void |
visitToken(DetailAST ast)
Called to process a token.
|
clearMessages, destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, log, setClassLoader, setFileContents, setTabWidth, setTokens
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
configure, contextualize, getConfiguration, setupChild
public static final String MSG_KEY
public SuppressWarningsHolder()
public static String getDefaultAlias(String sourceName)
sourceName
- the source name of the check (generally the class
name)public static String getAlias(String sourceName)
registerAlias(String, String)
, that
alias is returned; otherwise, the default alias is used.sourceName
- the source name of the check (generally the class
name)public void setAliasList(String... aliasList)
source=alias
items, such as com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck=
paramnum
.aliasList
- the list of comma-separated alias assignmentspublic static boolean isSuppressed(AuditEvent event)
event
- audit event.public int[] getDefaultTokens()
AbstractCheck
getDefaultTokens
in class AbstractCheck
TokenTypes
public int[] getAcceptableTokens()
AbstractCheck
getAcceptableTokens
in class AbstractCheck
TokenTypes
public int[] getRequiredTokens()
AbstractCheck
getRequiredTokens
in class AbstractCheck
TokenTypes
public void beginTree(DetailAST rootAST)
AbstractCheck
beginTree
in class AbstractCheck
rootAST
- the root of the treepublic void visitToken(DetailAST ast)
AbstractCheck
visitToken
in class AbstractCheck
ast
- the token to processCopyright © 2001–2018. All rights reserved.