public class SuppressWarningsHolder extends Check
SuppressWarnings
annotations.| Modifier and Type | Field and Description |
|---|---|
static String |
CHECKSTYLE_PREFIX
Optional prefix for warning suppressions that are only intended to be
recognized by checkstyle.
|
| Constructor and Description |
|---|
SuppressWarningsHolder() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTree(DetailAST aRootAST)
Called before the starting to process a tree.
|
static String |
getAlias(String aSourceName)
Returns the alias for the source name of a check.
|
static String |
getDefaultAlias(String aSourceName)
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.
|
static boolean |
isSuppressed(String aSourceName,
int aLine,
int aColumn)
Checks for a suppression of a check with the given source name and
location in the last file processed.
|
static void |
registerAlias(String aSourceName,
String aCheckAlias)
Registers an alias for the source name of a check.
|
void |
setAliasList(String aAliasList)
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 aAST)
Called to process a token.
|
destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLine, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokensgetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic static final String CHECKSTYLE_PREFIX
FallThroughCheck only in checkstyle (and not in javac), use the
suppression "checkstyle:fallthrough". To suppress the warning in
both tools, just use "fallthrough".public static String getDefaultAlias(String aSourceName)
aSourceName - the source name of the check (generally the class
name)public static String getAlias(String aSourceName)
registerAlias(String, String), that
alias is returned; otherwise, the default alias is used.aSourceName - the source name of the check (generally the class
name)public static void registerAlias(String aSourceName, String aCheckAlias)
aSourceName - the source name of the check (generally the class
name)aCheckAlias - the alias used in SuppressWarnings annotationspublic void setAliasList(String aAliasList)
source=alias items, such as com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck=
paramnum.aAliasList - the list of comma-separated alias assigmentspublic static boolean isSuppressed(String aSourceName, int aLine, int aColumn)
aSourceName - the source name of the checkaLine - the line number of the checkaColumn - the column number of the checkpublic int[] getDefaultTokens()
CheckgetDefaultTokens in class CheckTokenTypespublic void beginTree(DetailAST aRootAST)
Checkpublic void visitToken(DetailAST aAST)
CheckvisitToken in class CheckaAST - the token to processCopyright © 2001-2014. All Rights Reserved.