|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.gmetrics.metric.AbstractMetric
org.gmetrics.metric.AbstractMethodMetric
org.gmetrics.metric.crap.CrapMetric
class CrapMetric extends AbstractMethodMetric
Metric to calculate the CRAP metric See http://www.artima.com/weblogs/viewpost.jsp?thread=210575
Property Summary | |
---|---|
MethodMetric |
complexityMetric
|
MethodMetric |
coverageMetric
|
String |
name
|
Method Summary | |
---|---|
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)
Calculate the CRAP metric score |
Methods inherited from class AbstractMethodMetric | |
---|---|
applyToClosure, applyToMethod, calculate, calculate, calculateForClass |
Methods inherited from class AbstractMetric | |
---|---|
applyToClass, applyToPackage, calculateForClass, calculateForPackage, createAggregateMetricResult, isNotAnInterface |
Property Detail |
---|
MethodMetric complexityMetric
MethodMetric coverageMetric
final String name
Method Detail |
---|
@Override MetricResult calculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode)
@Override MetricResult calculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)
protected BigDecimal calculateCrapScore(BigDecimal complexity, BigDecimal coverage)
complexity
- - the cyclomatic complexity of a methodcoverage
- - the code coverage (by line) of a method
Groovy Documentation