public abstract class AbstractCoberturaCoverageMetric extends AbstractMetric implements MethodMetric, groovy.lang.GroovyObject
Modifier and Type | Field and Description |
---|---|
protected static 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(String packagePath,
String packageName,
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 String |
getAttributeName() |
MetricLevel |
getBaseLevel() |
String |
getCoberturaFile() |
protected Ratio |
getCoverageRatioForClass(String className) |
protected abstract Ratio |
getCoverageRatioForSingleClass(Object matchingClassElement) |
groovy.lang.MetaClass |
getMetaClass() |
Object |
getProperty(String property) |
Object |
invokeMethod(String method,
Object arguments) |
void |
setCoberturaFile(String value) |
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setProperty(String property,
Object value) |
applyToClass, applyToPackage, createAggregateMetricResult, createAggregateMetricResult, getEnabled, getFunctions, isEnabled, isNotAnInterface, setEnabled, setFunctions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyToClass, applyToPackage, getFunctions, getName, isEnabled
protected static int SCALE
protected static int ROUNDING_MODE
protected static Object LOG
public groovy.lang.MetaClass getMetaClass()
getMetaClass
in interface groovy.lang.GroovyObject
getMetaClass
in class AbstractMetric
public void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass
in interface groovy.lang.GroovyObject
setMetaClass
in class AbstractMetric
public Object invokeMethod(String method, Object arguments)
invokeMethod
in interface groovy.lang.GroovyObject
invokeMethod
in class AbstractMetric
public Object getProperty(String property)
getProperty
in interface groovy.lang.GroovyObject
getProperty
in class AbstractMetric
public void setProperty(String property, Object value)
setProperty
in interface groovy.lang.GroovyObject
setProperty
in class AbstractMetric
public MetricLevel getBaseLevel()
getBaseLevel
in interface Metric
public String getCoberturaFile()
public void setCoberturaFile(String value)
protected abstract String getAttributeName()
protected abstract Ratio getCoverageRatioForSingleClass(Object matchingClassElement)
public MetricResult applyToMethod(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)
applyToMethod
in interface MethodMetric
public MetricResult applyToClosure(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode)
applyToClosure
in interface MethodMetric
protected ClassMetricResult calculateForClass(org.codehaus.groovy.ast.ClassNode classNode, SourceCode sourceCode)
calculateForClass
in class AbstractMetric
protected MetricResult calculateForPackage(String packagePath, String packageName, Collection<MetricResult> childMetricResults)
calculateForPackage
in class AbstractMetric
public MetricResult calculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode)
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)
Copyright © 2015. All rights reserved.