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, checkTopLevelToken, curlyIndent, getCheckedChildren, getChildrenExpectedIndent, getLeftCurly, getListChild, getNonListChild, getRightCurly, getSuggestedChildIndent, getTopLevelAstcheckChildren, checkExpressionSubtree, checkLeftParen, checkModifiers, checkRightParen, checkWrappingIndentation, checkWrappingIndentation, expandedTabsColumnNo, findSubtreeAst, getBasicOffset, getBraceAdjustment, getFirstAstNode, getFirstLine, getFirstToken, getIndent, getIndentCheck, getIndentImpl, getLineStart, getLineStart, getMainAst, getParent, isOnStartOfLine, logError, logError, shouldIncreaseIndentprivate final boolean methodModifier
public SynchronizedHandler(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent)
indentCheck - the indentation checkast - the abstract syntax treeparent - the parent handlerpublic void checkIndentation()
AbstractExpressionHandlercheckIndentation in class BlockParentHandlerprivate 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)Copyright © 2001-2022. All Rights Reserved.