Package org.gmetrics.metric.crap
Class CrapMetric
java.lang.Object
org.gmetrics.metric.AbstractMetric
org.gmetrics.metric.AbstractMethodMetric
org.gmetrics.metric.crap.CrapMetric
- All Implemented Interfaces:
groovy.lang.GroovyObject,MethodMetric,Metric
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode) calculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode) protected BigDecimalcalculateCrapScore(BigDecimal complexity, BigDecimal coverage) groovy.lang.MetaClassfinal StringgetName()getProperty(String property) invokeMethod(String method, Object arguments) voidsetComplexityMetric(MethodMetric value) voidsetCoverageMetric(MethodMetric value) voidsetMetaClass(groovy.lang.MetaClass mc) voidsetProperty(String property, Object value) Methods inherited from class org.gmetrics.metric.AbstractMethodMetric
applyToClosure, applyToMethod, calculateForClass, getBaseLevel, getIncludeClosureFields, isIncludeClosureFields, lineNumberForMethod, setIncludeClosureFieldsMethods inherited from class org.gmetrics.metric.AbstractMetric
applyToClass, applyToPackage, calculateForPackage, createAggregateMetricResult, createAggregateMetricResult, getEnabled, getFunctions, isEnabled, isNotAnInterface, setEnabled, setFunctionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gmetrics.metric.Metric
applyToClass, applyToPackage, getFunctions, isEnabled
-
Constructor Details
-
CrapMetric
public CrapMetric()
-
-
Method Details
-
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
- Specified by:
invokeMethodin interfacegroovy.lang.GroovyObject- Overrides:
invokeMethodin classAbstractMethodMetric
-
getProperty
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject- Overrides:
getPropertyin classAbstractMethodMetric
-
setProperty
- Specified by:
setPropertyin interfacegroovy.lang.GroovyObject- Overrides:
setPropertyin classAbstractMethodMetric
-
getName
-
getCoverageMetric
-
setCoverageMetric
-
getComplexityMetric
-
setComplexityMetric
-
calculate
public MetricResult calculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode) - Specified by:
calculatein classAbstractMethodMetric
-
calculate
- Specified by:
calculatein classAbstractMethodMetric
-
calculateCrapScore
-