Class BooleanExpressionComplexityCheck.Context
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.metrics.BooleanExpressionComplexityCheck.Context
- Enclosing class:
- BooleanExpressionComplexityCheck
Represents context (method/expression) in which we check complexity.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkCount
(DetailAST ast) Checks if we violate maximum allowed complexity.boolean
Getter for checking property.void
Increases operator counter.
-
Field Details
-
checking
Should we perform check in current context or not. Usually false if we are inside equals() method. -
count
Count of boolean operators.
-
-
Constructor Details
-
Context
Creates new instance.- Parameters:
checking
- should we check in current context or not.
-
-
Method Details
-
isChecking
Getter for checking property.- Returns:
- should we check in current context or not.
-
visitBooleanOperator
Increases operator counter. -
checkCount
Checks if we violate maximum allowed complexity.- Parameters:
ast
- a node we check now.
-