Class CycloMetric
- java.lang.Object
-
- net.sourceforge.pmd.lang.metrics.AbstractMetric<N>
-
- net.sourceforge.pmd.lang.apex.metrics.AbstractApexMetric<ASTMethod>
-
- net.sourceforge.pmd.lang.apex.metrics.impl.AbstractApexOperationMetric
-
- net.sourceforge.pmd.lang.apex.metrics.impl.CycloMetric
-
- All Implemented Interfaces:
ApexOperationMetric
,Metric<ASTMethod>
public class CycloMetric extends AbstractApexOperationMetric
See the doc for the Java metric.- Author:
- Clément Fournier
-
-
Constructor Summary
Constructors Constructor Description CycloMetric()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
booleanExpressionComplexity(ASTStandardCondition expression)
Computes the number of control flow paths through that expression, which is the number of||
and&&
operators.double
computeFor(ASTMethod node, MetricOptions options)
-
Methods inherited from class net.sourceforge.pmd.lang.apex.metrics.impl.AbstractApexOperationMetric
supports
-
Methods inherited from class net.sourceforge.pmd.lang.metrics.AbstractMetric
equals, hashCode
-
-
-
-
Method Detail
-
computeFor
public double computeFor(ASTMethod node, 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
-
-