public class CrapMetric extends AbstractMethodMetric implements groovy.lang.GroovyObject
Constructor and Description |
---|
CrapMetric() |
Modifier and Type | Method and Description |
---|---|
MetricResult |
calculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression,
SourceCode sourceCode) |
MetricResult |
calculate(org.codehaus.groovy.ast.MethodNode methodNode,
SourceCode sourceCode) |
protected BigDecimal |
calculateCrapScore(BigDecimal complexity,
BigDecimal coverage) |
MethodMetric |
getComplexityMetric() |
MethodMetric |
getCoverageMetric() |
groovy.lang.MetaClass |
getMetaClass() |
String |
getName() |
Object |
getProperty(String property) |
Object |
invokeMethod(String method,
Object arguments) |
void |
setComplexityMetric(MethodMetric value) |
void |
setCoverageMetric(MethodMetric value) |
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setProperty(String property,
Object value) |
applyToClosure, applyToMethod, calculateForClass, getBaseLevel, getIncludeClosureFields, isIncludeClosureFields, setIncludeClosureFields
applyToClass, applyToPackage, calculateForPackage, createAggregateMetricResult, createAggregateMetricResult, getEnabled, getFunctions, isEnabled, isNotAnInterface, setEnabled, setFunctions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyToClass, applyToPackage, getFunctions, isEnabled
public groovy.lang.MetaClass getMetaClass()
getMetaClass
in interface groovy.lang.GroovyObject
getMetaClass
in class AbstractMethodMetric
public void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass
in interface groovy.lang.GroovyObject
setMetaClass
in class AbstractMethodMetric
public Object invokeMethod(String method, Object arguments)
invokeMethod
in interface groovy.lang.GroovyObject
invokeMethod
in class AbstractMethodMetric
public Object getProperty(String property)
getProperty
in interface groovy.lang.GroovyObject
getProperty
in class AbstractMethodMetric
public void setProperty(String property, Object value)
setProperty
in interface groovy.lang.GroovyObject
setProperty
in class AbstractMethodMetric
public MethodMetric getCoverageMetric()
public void setCoverageMetric(MethodMetric value)
public MethodMetric getComplexityMetric()
public void setComplexityMetric(MethodMetric value)
public MetricResult calculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode)
calculate
in class AbstractMethodMetric
public MetricResult calculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)
calculate
in class AbstractMethodMetric
protected BigDecimal calculateCrapScore(BigDecimal complexity, BigDecimal coverage)
Copyright © 2015. All rights reserved.