Package ghidra.program.util
Class CyclomaticComplexity
java.lang.Object
ghidra.program.util.CyclomaticComplexity
Class with a utility function to calculate the cyclomatic complexity of a function.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
calculateCyclomaticComplexity
(Function function, TaskMonitor monitor) Calculates the cyclomatic complexity of a function by decomposing it into a flow graph using a BasicBlockModel.
-
Constructor Details
-
CyclomaticComplexity
public CyclomaticComplexity()
-
-
Method Details
-
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
-