public class FinalParametersCheck extends Check
Check has an option ignorePrimitiveTypes which allows ignoring lack of final modifier at primitive datatype parameter. Default value false.
E.g.:
private void foo(int x) { ... } //parameter is of primitive type
| Constructor and Description |
|---|
FinalParametersCheck() |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getAcceptableTokens()
The configurable token set.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
void |
setIgnorePrimitiveTypes(boolean ignorePrimitiveTypes)
Sets ignoring primitive types as params.
|
void |
visitToken(DetailAST ast)
Called to process a token.
|
beginTree, destroy, finishTree, getClassLoader, 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 FinalParametersCheck()
public void setIgnorePrimitiveTypes(boolean ignorePrimitiveTypes)
ignorePrimitiveTypes - true or false.public int[] getDefaultTokens()
CheckgetDefaultTokens in class CheckTokenTypespublic int[] getAcceptableTokens()
CheckgetAcceptableTokens in class CheckTokenTypespublic void visitToken(DetailAST ast)
CheckvisitToken in class Checkast - the token to processCopyright © 2001–2015. All rights reserved.