public class TypeNameCheck extends AbstractAccessControlNameCheck
Checks that type names conform to a format specified
by the format property. The format is a
regular expression and defaults to
^[A-Z][a-zA-Z0-9]*$.
An example of how to configure the check is:
<module name="TypeName"/>
An example of how to configure the check for names that begin with a lower case letter, followed by letters, digits, and underscores is:
<module name="TypeName">
<property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/>
</module>
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PATTERN
Default pattern for type name.
|
MSG_INVALID_PATTERN| Constructor and Description |
|---|
TypeNameCheck()
Creates a new
TypeNameCheck instance. |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getAcceptableTokens()
The configurable token set.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
mustCheckName, setApplyToPackage, setApplyToPrivate, setApplyToProtected, setApplyToPublic, shouldCheckInScopevisitTokengetFormat, getRegexp, setCompileFlags, setFormatbeginTree, destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, 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 DEFAULT_PATTERN
public TypeNameCheck()
TypeNameCheck instance.public int[] getDefaultTokens()
CheckgetDefaultTokens in class CheckTokenTypespublic int[] getAcceptableTokens()
CheckgetAcceptableTokens in class CheckTokenTypespublic int[] getRequiredTokens()
CheckgetRequiredTokens in class CheckTokenTypesCopyright © 2001-2015. All Rights Reserved.