@Override public void visitWhileStatement(WhileStatementTree tree) { SyntaxToken whileKeyword = tree.whileKeyword(); checkNesting(whileKeyword); nestingLevel.push(whileKeyword); super.visitWhileStatement(tree); nestingLevel.pop(); }
@Override public void visitWhileStatement(WhileStatementTree tree) { SyntaxToken whileKeyword = tree.whileKeyword(); checkNesting(whileKeyword); nestingLevel.push(whileKeyword); super.visitWhileStatement(tree); nestingLevel.pop(); }
@Override public void visitWhileStatement(WhileStatementTree tree) { increaseComplexityByNesting(tree.whileKeyword()); nesting++; super.visitWhileStatement(tree); nesting--; }
@Override public void visitWhileStatement(WhileStatementTree tree) { increaseComplexityByNesting(tree.whileKeyword()); nesting++; super.visitWhileStatement(tree); nesting--; }
@Override public void visitWhileStatement(WhileStatementTree tree) { super.visitWhileStatement(tree); checkForReport(tree.statement(), tree.whileKeyword(), tree.closeParenToken(), tree.whileKeyword().text()); }
@Override public void visitWhileStatement(WhileStatementTree tree) { super.visitWhileStatement(tree); checkForReport(tree.statement(), tree.whileKeyword(), tree.closeParenToken(), tree.whileKeyword().text()); }
@Override public void visitWhileStatement(WhileStatementTree tree) { // do not scan the condition addLines(tree.whileKeyword(), tree.closeParenToken()); addLineOfCloseBrace(tree.whileKeyword(), tree.statement()); scan(tree.statement()); }
@Override public void visitWhileStatement(WhileStatementTree tree) { enterLoop(); super.visitWhileStatement(tree); leaveLoop(tree.whileKeyword()); }
@Override public void visitWhileStatement(WhileStatementTree tree) { // do not scan the condition addLines(tree.whileKeyword(), tree.closeParenToken()); addLineOfCloseBrace(tree.whileKeyword(), tree.statement()); scan(tree.statement()); }
@Override public void visitWhileStatement(WhileStatementTree tree) { enterLoop(); super.visitWhileStatement(tree); leaveLoop(tree.whileKeyword()); }
@Override public void visitNode(Tree tree) { switch (tree.kind()) { case WHILE_STATEMENT: WhileStatementTree whileStatementTree = (WhileStatementTree) tree; checkStatement(whileStatementTree.whileKeyword(), whileStatementTree.statement()); break; case DO_STATEMENT: DoWhileStatementTree doWhileStatementTree = (DoWhileStatementTree) tree; checkStatement(doWhileStatementTree.doKeyword(), doWhileStatementTree.statement()); break; case FOR_STATEMENT: ForStatementTree forStatementTree = (ForStatementTree) tree; checkStatement(forStatementTree.forKeyword(), forStatementTree.statement()); break; case FOR_EACH_STATEMENT: ForEachStatement forEachStatement = (ForEachStatement) tree; checkStatement(forEachStatement.forKeyword(), forEachStatement.statement()); break; case IF_STATEMENT: checkIfStatement((IfStatementTree) tree); break; default: break; } }
@Override public void visitNode(Tree tree) { switch (tree.kind()) { case WHILE_STATEMENT: WhileStatementTree whileStatementTree = (WhileStatementTree) tree; checkStatement(whileStatementTree.whileKeyword(), whileStatementTree.statement()); break; case DO_STATEMENT: DoWhileStatementTree doWhileStatementTree = (DoWhileStatementTree) tree; checkStatement(doWhileStatementTree.doKeyword(), doWhileStatementTree.statement()); break; case FOR_STATEMENT: ForStatementTree forStatementTree = (ForStatementTree) tree; checkStatement(forStatementTree.forKeyword(), forStatementTree.statement()); break; case FOR_EACH_STATEMENT: ForEachStatement forEachStatement = (ForEachStatement) tree; checkStatement(forEachStatement.forKeyword(), forEachStatement.statement()); break; case IF_STATEMENT: checkIfStatement((IfStatementTree) tree); break; default: break; } }
@Override public void visitNode(Tree tree) { switch (tree.kind()) { case WHILE_STATEMENT: WhileStatementTree whileStatementTree = (WhileStatementTree) tree; checkStatement(whileStatementTree.whileKeyword(), whileStatementTree.statement()); break; case DO_STATEMENT: DoWhileStatementTree doWhileStatementTree = (DoWhileStatementTree) tree; checkStatement(doWhileStatementTree.doKeyword(), doWhileStatementTree.statement()); break; case FOR_STATEMENT: ForStatementTree forStatementTree = (ForStatementTree) tree; checkStatement(forStatementTree.forKeyword(), forStatementTree.statement()); break; case FOR_EACH_STATEMENT: ForEachStatement forEachStatement = (ForEachStatement) tree; checkStatement(forEachStatement.forKeyword(), forEachStatement.statement()); break; case IF_STATEMENT: checkIfStatement((IfStatementTree) tree); break; default: break; } }