public abstract class AbstractCoberturaCoverageMetric extends AbstractMetric implements MethodMetric, groovy.lang.GroovyObject
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.Object |
LOG |
protected static int |
ROUNDING_MODE |
protected static int |
SCALE |
| Constructor and Description |
|---|
AbstractCoberturaCoverageMetric() |
| Modifier and Type | Method and Description |
|---|---|
MetricResult |
applyToClosure(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression,
SourceCode sourceCode) |
MetricResult |
applyToMethod(org.codehaus.groovy.ast.MethodNode methodNode,
SourceCode sourceCode) |
MetricResult |
calculate(org.codehaus.groovy.ast.MethodNode methodNode,
SourceCode sourceCode) |
protected ClassMetricResult |
calculateForClass(org.codehaus.groovy.ast.ClassNode classNode,
SourceCode sourceCode) |
protected MetricResult |
calculateForPackage(java.lang.String packagePath,
java.lang.String packageName,
java.util.Collection<MetricResult> childMetricResults) |
protected SingleNumberMetricResult |
calculateMethodResult(org.codehaus.groovy.ast.MethodNode methodNode,
groovy.util.slurpersupport.GPathResult classXmlElement) |
protected groovy.util.slurpersupport.GPathResult |
findMethodElement(org.codehaus.groovy.ast.MethodNode methodNode,
groovy.util.slurpersupport.GPathResult classXmlElement) |
protected abstract java.lang.String |
getAttributeName() |
MetricLevel |
getBaseLevel() |
java.lang.String |
getCoberturaFile() |
protected Ratio |
getCoverageRatioForClass(java.lang.String className) |
protected abstract Ratio |
getCoverageRatioForSingleClass(java.lang.Object matchingClassElement) |
groovy.lang.MetaClass |
getMetaClass() |
java.lang.Object |
getProperty(java.lang.String property) |
java.lang.Object |
invokeMethod(java.lang.String method,
java.lang.Object arguments) |
void |
setCoberturaFile(java.lang.String value) |
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setProperty(java.lang.String property,
java.lang.Object value) |
applyToClass, applyToPackage, createAggregateMetricResult, createAggregateMetricResult, getEnabled, getFunctions, isEnabled, isNotAnInterface, setEnabled, setFunctionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyToClass, applyToPackage, getFunctions, getName, isEnabledprotected static final int SCALE
protected static final int ROUNDING_MODE
protected static final java.lang.Object LOG
public groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectgetMetaClass in class AbstractMetricpublic void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass in interface groovy.lang.GroovyObjectsetMetaClass in class AbstractMetricpublic java.lang.Object invokeMethod(java.lang.String method,
java.lang.Object arguments)
invokeMethod in interface groovy.lang.GroovyObjectinvokeMethod in class AbstractMetricpublic java.lang.Object getProperty(java.lang.String property)
getProperty in interface groovy.lang.GroovyObjectgetProperty in class AbstractMetricpublic void setProperty(java.lang.String property,
java.lang.Object value)
setProperty in interface groovy.lang.GroovyObjectsetProperty in class AbstractMetricpublic final MetricLevel getBaseLevel()
getBaseLevel in interface Metricpublic java.lang.String getCoberturaFile()
public void setCoberturaFile(java.lang.String value)
protected abstract java.lang.String getAttributeName()
protected abstract Ratio getCoverageRatioForSingleClass(java.lang.Object matchingClassElement)
public MetricResult applyToMethod(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)
applyToMethod in interface MethodMetricpublic MetricResult applyToClosure(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode)
applyToClosure in interface MethodMetricprotected ClassMetricResult calculateForClass(org.codehaus.groovy.ast.ClassNode classNode, SourceCode sourceCode)
calculateForClass in class AbstractMetricprotected MetricResult calculateForPackage(java.lang.String packagePath, java.lang.String packageName, java.util.Collection<MetricResult> childMetricResults)
calculateForPackage in class AbstractMetricpublic MetricResult calculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)
protected Ratio getCoverageRatioForClass(java.lang.String className)
protected SingleNumberMetricResult calculateMethodResult(org.codehaus.groovy.ast.MethodNode methodNode, groovy.util.slurpersupport.GPathResult classXmlElement)
protected groovy.util.slurpersupport.GPathResult findMethodElement(org.codehaus.groovy.ast.MethodNode methodNode,
groovy.util.slurpersupport.GPathResult classXmlElement)