public class VisibilityModifierCheck extends Check
Public members are not flagged if the name matches the public member regular expression (contains "^serialVersionUID$" by default).
Rationale: Enforce encapsulation.DEFAULT_ERROR_SCORE, DEFAULT_INFO_SCORE, DEFAULT_WARNING_SCORE, mScoring, mViolationSize
コンストラクタと説明 |
---|
VisibilityModifierCheck()
Create an instance.
|
修飾子とタイプ | メソッドと説明 |
---|---|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
boolean |
isPackageAllowed() |
boolean |
isProtectedAllowed() |
void |
setPackageAllowed(boolean aPackageAllowed)
Set whether package visible members are allowed.
|
void |
setProtectedAllowed(boolean aProtectedAllowed)
Set whether protected members are allowed.
|
void |
setPublicMemberPattern(String aPattern)
Set the pattern for public members to ignore.
|
void |
visitToken(DetailAST aAST)
Called to process a token.
|
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
calculateScore, getCustomMessages, getErrorScore, getId, getInfoScore, getMessageBundle, getScore, getScoring, getSeverity, getSeverityLevel, getWarningScore, log, setErrorScore, setId, setInfoScore, setScore, setScoring, setSeverity, setWarningScore
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public boolean isProtectedAllowed()
public void setProtectedAllowed(boolean aProtectedAllowed)
aProtectedAllowed
- whether protected members are allowedpublic boolean isPackageAllowed()
public void setPackageAllowed(boolean aPackageAllowed)
aPackageAllowed
- whether package visible members are allowedpublic void setPublicMemberPattern(String aPattern)
aPattern
- pattern for public members to ignore.public int[] getDefaultTokens()
Check
getDefaultTokens
クラス内 Check
TokenTypes
public void visitToken(DetailAST aAST)
Check
visitToken
クラス内 Check
aAST
- the token to processCopyright © 2001-2013. All Rights Reserved.