Package org.gmetrics.metric.cyclomatic
Class CyclomaticComplexityMetric
- java.lang.Object
-
- org.gmetrics.metric.AbstractMetric
-
- org.gmetrics.metric.AbstractMethodMetric
-
- org.gmetrics.metric.cyclomatic.CyclomaticComplexityMetric
-
- All Implemented Interfaces:
groovy.lang.GroovyObject,MethodMetric,Metric
public class CyclomaticComplexityMetric extends AbstractMethodMetric
-
-
Constructor Summary
Constructors Constructor Description CyclomaticComplexityMetric()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricResultcalculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode)MetricResultcalculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)groovy.lang.MetaClassgetMetaClass()java.lang.StringgetName()java.lang.ObjectgetProperty(java.lang.String property)java.lang.ObjectinvokeMethod(java.lang.String method, java.lang.Object arguments)voidsetMetaClass(groovy.lang.MetaClass mc)voidsetProperty(java.lang.String property, java.lang.Object value)-
Methods inherited from class org.gmetrics.metric.AbstractMethodMetric
applyToClosure, applyToMethod, calculateForClass, getBaseLevel, getIncludeClosureFields, isIncludeClosureFields, lineNumberForMethod, setIncludeClosureFields
-
Methods inherited from class org.gmetrics.metric.AbstractMetric
applyToClass, applyToPackage, calculateForPackage, createAggregateMetricResult, createAggregateMetricResult, getEnabled, getFunctions, isEnabled, isNotAnInterface, setEnabled, setFunctions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gmetrics.metric.Metric
applyToClass, applyToPackage, getFunctions, isEnabled
-
-
-
-
Method Detail
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClassin interfacegroovy.lang.GroovyObject- Overrides:
getMetaClassin classAbstractMethodMetric
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClassin interfacegroovy.lang.GroovyObject- Overrides:
setMetaClassin classAbstractMethodMetric
-
invokeMethod
public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)- Specified by:
invokeMethodin interfacegroovy.lang.GroovyObject- Overrides:
invokeMethodin classAbstractMethodMetric
-
getProperty
public java.lang.Object getProperty(java.lang.String property)
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject- Overrides:
getPropertyin classAbstractMethodMetric
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value)- Specified by:
setPropertyin interfacegroovy.lang.GroovyObject- Overrides:
setPropertyin classAbstractMethodMetric
-
getName
public final java.lang.String getName()
-
calculate
public MetricResult calculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)
- Specified by:
calculatein classAbstractMethodMetric
-
calculate
public MetricResult calculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode)
- Specified by:
calculatein classAbstractMethodMetric
-
-