public class SynchronizedHandler extends BlockParentHandler
Modifier and Type | Field and Description |
---|---|
private boolean |
methodModifier
Determine that "synchronized" token used as modifier of method.
|
Constructor and Description |
---|
SynchronizedHandler(IndentationCheck indentCheck,
DetailAST ast,
AbstractExpressionHandler parent)
Construct an instance of this handler with the given indentation check,
name, abstract syntax tree, and parent handler.
|
Modifier and Type | Method and Description |
---|---|
void |
checkIndentation()
Check the indentation of the expression we are handling.
|
private void |
checkSynchronizedExpr()
Check indentation of expression we synchronized on.
|
private static DetailAST |
getSynchronizedStatementRightParen(DetailAST syncStatementAST)
Returns right parenthesis of synchronized statement.
|
private static boolean |
isMethodModifier(DetailAST ast)
Checks if given synchronized is modifier of method.
|
canChildrenBeNested, checkLeftCurly, checkRightCurly, checkTopLevelToken, curlyIndent, getCheckedChildren, getChildrenExpectedIndent, getLeftCurly, getLeftParen, getListChild, getNonListChild, getRightCurly, getRightParen, getSuggestedChildIndent, getTopLevelAst, hasCurlies, hasLabelBefore, shouldTopLevelStartLine
areOnSameLine, checkChildren, checkExpressionSubtree, checkLeftParen, checkModifiers, checkRightParen, checkWrappingIndentation, checkWrappingIndentation, expandedTabsColumnNo, findSubtreeLines, getBasicOffset, getBraceAdjustment, getFirstLine, getFirstToken, getIndent, getIndentCheck, getIndentImpl, getLineStart, getLineStart, getMainAst, getParent, isOnStartOfLine, logError, logError, shouldIncreaseIndent
private final boolean methodModifier
public SynchronizedHandler(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent)
indentCheck
- the indentation checkast
- the abstract syntax treeparent
- the parent handlerpublic void checkIndentation()
AbstractExpressionHandler
checkIndentation
in class BlockParentHandler
private void checkSynchronizedExpr()
private static boolean isMethodModifier(DetailAST ast)
ast
- synchronized(TokenTypes.LITERAL_SYNCHRONIZED) to checkprivate static DetailAST getSynchronizedStatementRightParen(DetailAST syncStatementAST)
syncStatementAST
- ast node(TokenTypes.LITERAL_SYNCHRONIZED)