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 overriden to specify the
location of the type parameter to check.
|
getDefaultTokens, init, mustCheckName
visitToken
getFormat, getRegexp, setCompileFlags, setFormat
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLine, getLines, getRequiredTokens, getTabWidth, getTokenNames, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public ClassTypeParameterNameCheck()
ClassTypeParameterNameCheck
instance.protected final int getLocation()
AbstractTypeParameterNameCheck
getLocation
in class AbstractTypeParameterNameCheck
TokenTypes.CLASS_DEF
or TokenTypes.METHOD_DEF
Copyright © 2001–2015. All rights reserved.