public class MultipleVariableDeclarationsCheck extends Check
Checks that each variable declaration is in its own statement and on its own line.
Rationale: the SUN Code conventions chapter 6.1 recommends that declarations should be one per line.
An example of how to configure the check is:
<module name="MultipleVariableDeclarations"/>
| Constructor and Description |
|---|
MultipleVariableDeclarationsCheck()
Creates new instance of the check.
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
void |
visitToken(DetailAST ast)
Called to process a token.
|
beginTree, destroy, finishTree, getAcceptableTokens, 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 MultipleVariableDeclarationsCheck()
public int[] getDefaultTokens()
CheckgetDefaultTokens in class CheckTokenTypespublic void visitToken(DetailAST ast)
CheckvisitToken in class Checkast - the token to processCopyright © 2001–2015. All rights reserved.