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, setTokensfinishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverityconfigure, contextualize, getConfiguration, setupChildpublic 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()
AbstractCheckgetDefaultTokens in class AbstractCheckTokenTypespublic int[] getAcceptableTokens()
AbstractCheckgetAcceptableTokens in class AbstractCheckTokenTypespublic int[] getRequiredTokens()
AbstractCheckgetRequiredTokens in class AbstractCheckTokenTypespublic void beginTree(DetailAST rootAST)
AbstractCheckbeginTree in class AbstractCheckrootAST - the root of the treepublic void visitToken(DetailAST ast)
AbstractCheckvisitToken in class AbstractCheckast - the token to processCopyright © 2001–2018. All rights reserved.