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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidcheckCount(DetailAST ast) Checks if we violate maximum allowed complexity.(package private) booleanGetter for checking property.(package private) voidIncreases 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
boolean isChecking()Getter for checking property.- Returns:
- should we check in current context or not.
-
visitBooleanOperator
void visitBooleanOperator()Increases operator counter. -
checkCount
Checks if we violate maximum allowed complexity.- Parameters:
ast- a node we check now.
-