Package ghidra.program.util
Class CyclomaticComplexity
- java.lang.Object
-
- ghidra.program.util.CyclomaticComplexity
-
public class CyclomaticComplexity extends java.lang.Object
Class with a utility function to calculate the cyclomatic complexity of a function.
-
-
Constructor Summary
Constructors Constructor Description CyclomaticComplexity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calculateCyclomaticComplexity(Function function, TaskMonitor monitor)
Calculates the cyclomatic complexity of a function by decomposing it into a flow graph using a BasicBlockModel.
-
-
-
Method Detail
-
calculateCyclomaticComplexity
public int calculateCyclomaticComplexity(Function function, TaskMonitor monitor) throws CancelledException
Calculates the cyclomatic complexity of a function by decomposing it into a flow graph using a BasicBlockModel.- Parameters:
function
- the functionmonitor
- a monitor- Returns:
- the cyclomatic complexity
- Throws:
CancelledException
-
-