com.puppycrawl.tools.checkstyle.checks.usage
Class AbstractUsageCheck
- Configurable, Contextualizable
public abstract class AbstractUsageCheck
Performs a usage check for fields, methods, parameters, variables.
- Rick Giles
beginTree , destroy , finishTree , getAcceptableTokens , getClassLoader , getDefaultTokens , getFileContents , getLines , getRequiredTokens , getTabWidth , getTokenNames , init , leaveToken , log , log , setClassLoader , setFileContents , setMessages , setTabWidth , setTokens , visitToken |
getMessageBundle , getSeverity , getSeverityLevel , log , log , log , log , log , log , log , log , log , log , log , setSeverity |
AbstractUsageCheck
public AbstractUsageCheck()
Constructs an AbstractUsageCheck
.
applyTo
public void applyTo(Set aNodes)
Applies this check to a set of nodes.
aNodes
- the nodes to check.
getASTManager
protected com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.ASTManager getASTManager()
Gets the manager for AST nodes.
- the AST manager.
getErrorKey
public String getErrorKey()
Returns the key for the Checkstyle error message.
- the key for the Checkstyle error message.
getIgnoreFormat
public String getIgnoreFormat()
- the regexp format
getRegexp
public RE getRegexp()
- the regexp to match against
logError
public void logError(Exception aException)
Logs an exception.
aException
- the exception to log.
mustCheckReferenceCount
public boolean mustCheckReferenceCount(DetailAST aAST)
Determines whether the reference count of an aAST is required.
aAST
- the node to check.
- true if the reference count of aAST is required.
setIgnoreFormat
public void setIgnoreFormat(String aFormat)
throws ConversionException
Set the ignore format to the specified regular expression.
aFormat
- a String
value