public final class ParameterAssignmentCheck extends Check
Disallow assignment of parameters.
Rationale: Parameter assignment is often considered poor programming practice. Forcing developers to declare parameters as final is often onerous. Having a check ensure that parameters are never assigned would give the best of both worlds.
Constructor and Description |
---|
ParameterAssignmentCheck() |
Modifier and Type | Method and Description |
---|---|
void |
beginTree(DetailAST aRootAST)
Called before the starting to process a tree.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
void |
leaveToken(DetailAST aAST)
Called after all the child nodes have been process.
|
void |
visitToken(DetailAST aAST)
Called to process a token.
|
destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLines, getTabWidth, getTokenNames, init, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public int[] getDefaultTokens()
getDefaultTokens
in class Check
TokenTypes
public int[] getRequiredTokens()
getRequiredTokens
in class Check
TokenTypes
public void beginTree(DetailAST aRootAST)
public void visitToken(DetailAST aAST)
visitToken
in class Check
aAST
- the token to processpublic void leaveToken(DetailAST aAST)
leaveToken
in class Check
aAST
- the token leaving