Class SynchronizedHandler

    • Field Detail

      • methodModifier

        private final boolean methodModifier
        Determine that "synchronized" token used as modifier of method.
    • Constructor Detail

      • SynchronizedHandler

        public 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.
        indentCheck - the indentation check
        ast - the abstract syntax tree
        parent - the parent handler
    • Method Detail

      • checkSynchronizedExpr

        private void checkSynchronizedExpr()
        Check indentation of expression we synchronized on.
      • isMethodModifier

        private static boolean isMethodModifier​(DetailAST ast)
        Checks if given synchronized is modifier of method.
        ast - synchronized(TokenTypes.LITERAL_SYNCHRONIZED) to check
        true if synchronized only modifies method
      • getSynchronizedStatementRightParen

        private static DetailAST getSynchronizedStatementRightParen​(DetailAST syncStatementAST)
        Returns right parenthesis of synchronized statement.
        syncStatementAST - ast node(TokenTypes.LITERAL_SYNCHRONIZED)
        right parenthesis of synchronized statement.