Class ComplexityCounter
java.lang.Object
org.ek9lang.compiler.phase5.ComplexityCounter
Designed to give a broad indication of complexity, this is not true pure Cyclometric Complexity.
But it works on a region or code structure approach, looking at anything that may contribute to code
being harder to read or taking more thought than just a simple sequence of statements.
It takes into account boolean expressions, exception blocks and case statement for example.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidincrementComplexity(int byValue) voidincrementComplexity(AtomicInteger byValue) booleanisEmpty()True if stack has no contents.peek()Take a look at the top of the stack.pop()Pop a value of the stack (exception is empty.push()Push a zero value on to this stack.push(int initialValue) Push a zero value on to this stack.
-
Constructor Details
-
ComplexityCounter
ComplexityCounter()
-
-
Method Details
-
push
Push a zero value on to this stack. -
push
Push a zero value on to this stack. -
peek
Take a look at the top of the stack. -
pop
Pop a value of the stack (exception is empty. -
incrementComplexity
public void incrementComplexity() -
incrementComplexity
-
incrementComplexity
public void incrementComplexity(int byValue) -
isEmpty
public boolean isEmpty()True if stack has no contents.
-