Class CognitiveComplexityMetric
- java.lang.Object
-
- net.sourceforge.pmd.lang.metrics.AbstractMetric<N>
-
- net.sourceforge.pmd.lang.java.metrics.AbstractJavaMetric<MethodLikeNode>
-
- net.sourceforge.pmd.lang.java.metrics.impl.AbstractJavaOperationMetric
-
- net.sourceforge.pmd.lang.java.metrics.impl.CognitiveComplexityMetric
-
- All Implemented Interfaces:
JavaOperationMetric
,Metric<MethodLikeNode>
public class CognitiveComplexityMetric extends AbstractJavaOperationMetric
Measures the cognitive complexity of a Class / Method in Java. See https://www.sonarsource.com/docs/CognitiveComplexity.pdf for information about the metric- Since:
- May 2021
- Author:
- Denis Borovikov, based on work of Gwilym Kuiper
-
-
Constructor Summary
Constructors Constructor Description CognitiveComplexityMetric()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
computeFor(MethodLikeNode node, MetricOptions options)
-
Methods inherited from class net.sourceforge.pmd.lang.java.metrics.impl.AbstractJavaOperationMetric
supports, supports
-
Methods inherited from class net.sourceforge.pmd.lang.metrics.AbstractMetric
equals, hashCode
-
-
-
-
Method Detail
-
computeFor
public double computeFor(MethodLikeNode node, MetricOptions options)
-
-