/** * Notify checks that leaving a node. * @param ast * the node to notify for * @param astState state of AST. */ private void notifyLeave(DetailAST ast, AstState astState) { final Collection<AbstractCheck> visitors = getListOfChecks(ast, astState); if (visitors != null) { for (AbstractCheck check : visitors) { check.leaveToken(ast); } } }
@Override public void leaveToken(DetailAST ast) { this.check.leaveToken(ast); }
/** * Notify checks that leaving a node. * @param ast * the node to notify for * @param astState state of AST. */ private void notifyLeave(DetailAST ast, AstState astState) { final Collection<AbstractCheck> visitors = getListOfChecks(ast, astState); if (visitors != null) { for (AbstractCheck check : visitors) { check.leaveToken(ast); } } }
@Override public void leaveToken(DetailAST ast) { final int type = ast.getType(); final DetailAST parent = ast.getParent(); // shouldn't process assign in annotation pairs if ((type != TokenTypes.ASSIGN) || (parent.getType() != TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR)) { // An expression is surrounded by parentheses. if (type == TokenTypes.EXPR) { leaveTokenExpression(ast); parentToSkip = null; } else if (inTokenList(type, ASSIGNMENTS)) { assignDepth--; } super.leaveToken(ast); } }