public class CognitiveComplexityVisitor extends BaseTreeVisitor
Modifier and Type | Class and Description |
---|---|
static class |
CognitiveComplexityVisitor.Result
Cognitive complexity and associated locations
|
Modifier and Type | Method and Description |
---|---|
static int |
compilationUnitComplexity(CompilationUnitTree cut) |
static CognitiveComplexityVisitor.Result |
methodComplexity(MethodTree methodTree) |
void |
visitBinaryExpression(BinaryExpressionTree tree) |
void |
visitBreakStatement(BreakStatementTree tree) |
void |
visitClass(ClassTree tree) |
void |
visitConditionalExpression(ConditionalExpressionTree tree) |
void |
visitContinueStatement(ContinueStatementTree tree) |
void |
visitDoWhileStatement(DoWhileStatementTree tree) |
void |
visitForEachStatement(ForEachStatement tree) |
void |
visitForStatement(ForStatementTree tree) |
void |
visitIfStatement(IfStatementTree tree) |
void |
visitLambdaExpression(LambdaExpressionTree lambdaExpressionTree) |
void |
visitSwitchStatement(SwitchStatementTree tree) |
void |
visitTryStatement(TryStatementTree tree) |
void |
visitWhileStatement(WhileStatementTree tree) |
scan, scan, scan, visitAnnotation, visitArrayAccessExpression, visitArrayDimension, visitArrayType, visitAssertStatement, visitAssignmentExpression, visitBlock, visitCaseGroup, visitCaseLabel, visitCatch, visitCompilationUnit, visitEmptyStatement, visitEnumConstant, visitExportsDirectiveTree, visitExpressionStatement, visitIdentifier, visitImport, visitInstanceOf, visitLabeledStatement, visitLiteral, visitMemberSelectExpression, visitMethod, visitMethodInvocation, visitMethodReference, visitModifier, visitModule, visitNewArray, visitNewClass, visitOpensDirective, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitProvidesDirective, visitRequiresDirectiveTree, visitReturnStatement, visitSynchronizedStatement, visitThrowStatement, visitTypeArguments, visitTypeCast, visitTypeParameter, visitTypeParameters, visitUnaryExpression, visitUnionType, visitUsesDirective, visitVariable, visitWildcard
public static CognitiveComplexityVisitor.Result methodComplexity(MethodTree methodTree)
public static int compilationUnitComplexity(CompilationUnitTree cut)
public void visitIfStatement(IfStatementTree tree)
visitIfStatement
in interface TreeVisitor
visitIfStatement
in class BaseTreeVisitor
public void visitTryStatement(TryStatementTree tree)
visitTryStatement
in interface TreeVisitor
visitTryStatement
in class BaseTreeVisitor
public void visitForStatement(ForStatementTree tree)
visitForStatement
in interface TreeVisitor
visitForStatement
in class BaseTreeVisitor
public void visitForEachStatement(ForEachStatement tree)
visitForEachStatement
in interface TreeVisitor
visitForEachStatement
in class BaseTreeVisitor
public void visitWhileStatement(WhileStatementTree tree)
visitWhileStatement
in interface TreeVisitor
visitWhileStatement
in class BaseTreeVisitor
public void visitDoWhileStatement(DoWhileStatementTree tree)
visitDoWhileStatement
in interface TreeVisitor
visitDoWhileStatement
in class BaseTreeVisitor
public void visitConditionalExpression(ConditionalExpressionTree tree)
visitConditionalExpression
in interface TreeVisitor
visitConditionalExpression
in class BaseTreeVisitor
public void visitSwitchStatement(SwitchStatementTree tree)
visitSwitchStatement
in interface TreeVisitor
visitSwitchStatement
in class BaseTreeVisitor
public void visitBreakStatement(BreakStatementTree tree)
visitBreakStatement
in interface TreeVisitor
visitBreakStatement
in class BaseTreeVisitor
public void visitContinueStatement(ContinueStatementTree tree)
visitContinueStatement
in interface TreeVisitor
visitContinueStatement
in class BaseTreeVisitor
public void visitClass(ClassTree tree)
visitClass
in interface TreeVisitor
visitClass
in class BaseTreeVisitor
public void visitLambdaExpression(LambdaExpressionTree lambdaExpressionTree)
visitLambdaExpression
in interface TreeVisitor
visitLambdaExpression
in class BaseTreeVisitor
public void visitBinaryExpression(BinaryExpressionTree tree)
visitBinaryExpression
in interface TreeVisitor
visitBinaryExpression
in class BaseTreeVisitor
Copyright © 2012–2017 SonarSource. All rights reserved.