Class CycloMetric

    • Constructor Detail

      • CycloMetric

        public CycloMetric()
    • Method Detail

      • computeFor

        public double computeFor​(ASTMethod node,
                                 net.sourceforge.pmd.lang.metrics.MetricOptions options)
      • booleanExpressionComplexity

        public static int booleanExpressionComplexity​(ASTStandardCondition expression)
        Computes the number of control flow paths through that expression, which is the number of || and && operators. Used both by Npath and Cyclo.
        Parameters:
        expression - Boolean expression
        Returns:
        The complexity of the expression