public final class CurlyBracketsStructureCheck extends AbstractCheck
This is how a correct curly bracket structure should look like:
String[] array = new String[] {
"first",
"second"
};
or
String[] array = new String[] {"first", "second"};
The motivation for such formatting is simple - we want to see the entire block as fast as possible. When you look at a block of code you should be able to see where it starts and where it ends.
AutomaticBean.OutputStreamOptions| Constructor and Description |
|---|
CurlyBracketsStructureCheck() |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getAcceptableTokens() |
int[] |
getDefaultTokens() |
int[] |
getRequiredTokens() |
void |
visitToken(DetailAST ast) |
beginTree, clearMessages, destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, log, setClassLoader, setFileContents, setTabWidth, setTokensfinishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverityconfigure, contextualize, getConfiguration, setupChildpublic int[] getDefaultTokens()
getDefaultTokens in class AbstractCheckpublic int[] getAcceptableTokens()
getAcceptableTokens in class AbstractCheckpublic int[] getRequiredTokens()
getRequiredTokens in class AbstractCheckpublic void visitToken(DetailAST ast)
visitToken in class AbstractCheckCopyright © 2011–2019 Qulice.com. All rights reserved.