Class CyclomaticComplexity


  • public class CyclomaticComplexity
    extends java.lang.Object
    Class with a utility function to calculate the cyclomatic complexity of a function.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CyclomaticComplexity

        public CyclomaticComplexity()
    • 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 function
        monitor - a monitor
        Returns:
        the cyclomatic complexity
        Throws:
        CancelledException