com.puppycrawl.tools.checkstyle.checks.naming
Class MemberNameCheck
- Configurable, Contextualizable
public class MemberNameCheck
Checks that instance variable 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="MemberName"/>
An example of how to configure the check for names that begin with
"m", followed by an upper case letter, and then letters and
digits is:
<module name="MemberName">
<property name="format" value="^m[A-Z][a-zA-Z0-9]*$"/>
</module>
beginTree , destroy , finishTree , getAcceptableTokens , getClassLoader , getDefaultTokens , getFileContents , getLines , getRequiredTokens , getTabWidth , getTokenNames , init , leaveToken , log , log , setClassLoader , setFileContents , setMessages , setTabWidth , setTokens , visitToken |
getId , getMessageBundle , getSeverity , getSeverityLevel , log , log , log , log , log , log , log , log , log , log , log , setId , setSeverity |
MemberNameCheck
public MemberNameCheck()
Creates a new MemberNameCheck
instance.
getApplyToPackage
public boolean getApplyToPackage()
- true if the check should be applied to package-private members.
getApplyToPrivate
public boolean getApplyToPrivate()
- true if the check should be applied to private members.
getApplyToProtected
public boolean getApplyToProtected()
- true if the check should be applied to protected members.
getApplyToPublic
public boolean getApplyToPublic()
- true if the check should be applied to public members.
setApplyToPackage
public void setApplyToPackage(boolean aApplyTo)
Sets whether we should apply the check to package-private members.
aApplyTo
- new value of the property.
setApplyToPrivate
public void setApplyToPrivate(boolean aApplyTo)
Sets whether we should apply the check to private members.
aApplyTo
- new value of the property.
setApplyToProtected
public void setApplyToProtected(boolean aApplyTo)
Sets whether we should apply the check to protected members.
aApplyTo
- new value of the property.
setApplyToPublic
public void setApplyToPublic(boolean aApplyTo)
Sets whether we should apply the check to public members.
aApplyTo
- new value of the property.