public final class BracketsStructureCheck extends AbstractCheck
This is how a correct bracket structure should look like:
String text = String.format( "some text: %s", new Foo().with( "abc", "foo" ) );
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. In exactly the same way we organize curled brackets.
In other words, when you open a bracket and can't close it at the same line - you should leave it as the last symbol at this line.
AutomaticBean.OutputStreamOptions
Constructor and Description |
---|
BracketsStructureCheck() |
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, setTokens
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
configure, contextualize, getConfiguration, setupChild
public int[] getDefaultTokens()
getDefaultTokens
in class AbstractCheck
public int[] getAcceptableTokens()
getAcceptableTokens
in class AbstractCheck
public int[] getRequiredTokens()
getRequiredTokens
in class AbstractCheck
public void visitToken(DetailAST ast)
visitToken
in class AbstractCheck
Copyright © 2011–2019 Qulice.com. All rights reserved.