public class ClassTypeParameterNameCheck extends AbstractTypeParameterNameCheck
Checks that class type parameter names conform to a format specified
by the format property. The format is a
regular expression and defaults to
^[A-Z]$.
An example of how to configure the check is:
<module name="ClassTypeParameterName"/>
An example of how to configure the check for names that are only a single letter is
<module name="ClassTypeParameterName">
<property name="format" value="^[a-zA-Z]$"/>
</module>
MSG_INVALID_PATTERN| Constructor and Description |
|---|
ClassTypeParameterNameCheck()
Creates a new
ClassTypeParameterNameCheck instance. |
| Modifier and Type | Method and Description |
|---|---|
protected int |
getLocation()
This method must be overridden to specify the
location of the type parameter to check.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
getAcceptableTokens, getDefaultTokens, mustCheckNamevisitTokengetFormat, 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 ClassTypeParameterNameCheck()
ClassTypeParameterNameCheck instance.public int[] getRequiredTokens()
CheckgetRequiredTokens in class CheckTokenTypesprotected final int getLocation()
AbstractTypeParameterNameCheckgetLocation in class AbstractTypeParameterNameCheckTokenTypes.CLASS_DEF
or TokenTypes.METHOD_DEF Copyright © 2001-2015. All Rights Reserved.