public abstract class AbstractAccessControlNameCheck extends AbstractNameCheck
This class extends AbstractNameCheck with support for access level
restrictions. This allows the check to be configured to be applied to one of
the four Java access levels: public, protected,
"package", and private.
Level is configured using the following properties:
MSG_INVALID_PATTERN| Constructor and Description |
|---|
AbstractAccessControlNameCheck(String aFormat)
Creates a new
AbstractAccessControlNameCheck instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getApplyToPackage() |
boolean |
getApplyToPrivate() |
boolean |
getApplyToProtected() |
boolean |
getApplyToPublic() |
protected boolean |
mustCheckName(DetailAST aAST)
Decides whether the name of an AST should be checked against
the format regexp.
|
void |
setApplyToPackage(boolean aApplyTo)
Sets whether we should apply the check to package-private members.
|
void |
setApplyToPrivate(boolean aApplyTo)
Sets whether we should apply the check to private members.
|
void |
setApplyToProtected(boolean aApplyTo)
Sets whether we should apply the check to protected members.
|
void |
setApplyToPublic(boolean aApplyTo)
Sets whether we should apply the check to public members.
|
protected boolean |
shouldCheckInScope(DetailAST aModifiers)
Should we check member with given modifiers.
|
visitTokengetFormat, getRegexp, setCompileFlags, setFormatbeginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLine, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokensgetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic AbstractAccessControlNameCheck(String aFormat)
AbstractAccessControlNameCheck instance.aFormat - format to check withprotected boolean mustCheckName(DetailAST aAST)
AbstractNameCheckmustCheckName in class AbstractNameCheckaAST - the AST to check.protected boolean shouldCheckInScope(DetailAST aModifiers)
aModifiers - modifiers of member to check.public void setApplyToPublic(boolean aApplyTo)
aApplyTo - new value of the property.public boolean getApplyToPublic()
public void setApplyToProtected(boolean aApplyTo)
aApplyTo - new value of the property.public boolean getApplyToProtected()
public void setApplyToPackage(boolean aApplyTo)
aApplyTo - new value of the property.public boolean getApplyToPackage()
public void setApplyToPrivate(boolean aApplyTo)
aApplyTo - new value of the property.public boolean getApplyToPrivate()
Copyright © 2001-2014. All Rights Reserved.