com.puppycrawl.tools.checkstyle.checks.naming

Class AbstractNameCheck

Implemented Interfaces:
Configurable, Contextualizable
Known Direct Subclasses:
ConstantNameCheck, LocalFinalVariableNameCheck, LocalVariableNameCheck, MemberNameCheck, MethodNameCheck, ParameterNameCheck, StaticVariableNameCheck, TypeNameCheck

public abstract class AbstractNameCheck
extends AbstractFormatCheck

Abstract class for checking that names conform to a specified format.
Version:
1.0
Author:
Rick Giles

Constructor Summary

AbstractNameCheck(String aFormat)
Creates a new AbstractNameCheck instance.

Method Summary

protected boolean
mustCheckName(DetailAST aAST)
Decides whether the name of an AST should be checked against the format regexp.
void
visitToken(DetailAST aAST)

Methods inherited from class com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck

getFormat, getRegexp, setCompileFlags, setFormat

Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check

beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter

getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setId, setSeverity

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean

configure, contextualize, finishLocalSetup, getConfiguration, setupChild

Constructor Details

AbstractNameCheck

public AbstractNameCheck(String aFormat)
Creates a new AbstractNameCheck instance.
Parameters:
aFormat - format to check with

Method Details

mustCheckName

protected boolean mustCheckName(DetailAST aAST)
Decides whether the name of an AST should be checked against the format regexp.
Parameters:
aAST - the AST to check.
Returns:
true if the IDENT subnode of aAST should be checked against the format regexp.

visitToken

public void visitToken(DetailAST aAST)
Overrides:
visitToken in interface Check