public abstract class AbstractMetric extends Object implements Metric, groovy.lang.GroovyObject
Constructor and Description |
---|
AbstractMetric() |
Modifier and Type | Method and Description |
---|---|
ClassMetricResult |
applyToClass(org.codehaus.groovy.ast.ClassNode classNode,
SourceCode sourceCode) |
MetricResult |
applyToPackage(String path,
String packageName,
Collection<MetricResult> childMetricResults) |
protected abstract ClassMetricResult |
calculateForClass(org.codehaus.groovy.ast.ClassNode classNode,
SourceCode sourceCode) |
protected MetricResult |
calculateForPackage(String path,
String packageName,
Collection<MetricResult> childMetricResults) |
protected MetricResult |
createAggregateMetricResult(MetricLevel metricLevel,
Collection<MetricResult> childMetricResults) |
protected MetricResult |
createAggregateMetricResult(MetricLevel metricLevel,
Collection<MetricResult> childMetricResults,
org.codehaus.groovy.ast.ASTNode node) |
boolean |
getEnabled() |
List<String> |
getFunctions() |
groovy.lang.MetaClass |
getMetaClass() |
Object |
getProperty(String property) |
Object |
invokeMethod(String method,
Object arguments) |
boolean |
isEnabled() |
protected boolean |
isNotAnInterface(org.codehaus.groovy.ast.ClassNode classNode) |
void |
setEnabled(boolean value) |
void |
setFunctions(List<String> value) |
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setProperty(String property,
Object value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBaseLevel, getName
protected MetricResult createAggregateMetricResult(MetricLevel metricLevel, Collection<MetricResult> childMetricResults)
public groovy.lang.MetaClass getMetaClass()
getMetaClass
in interface groovy.lang.GroovyObject
public void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass
in interface groovy.lang.GroovyObject
public Object invokeMethod(String method, Object arguments)
invokeMethod
in interface groovy.lang.GroovyObject
public Object getProperty(String property)
getProperty
in interface groovy.lang.GroovyObject
public void setProperty(String property, Object value)
setProperty
in interface groovy.lang.GroovyObject
public boolean getEnabled()
public void setEnabled(boolean value)
public List<String> getFunctions()
getFunctions
in interface Metric
protected abstract ClassMetricResult calculateForClass(org.codehaus.groovy.ast.ClassNode classNode, SourceCode sourceCode)
public MetricResult applyToPackage(String path, String packageName, Collection<MetricResult> childMetricResults)
applyToPackage
in interface Metric
protected MetricResult calculateForPackage(String path, String packageName, Collection<MetricResult> childMetricResults)
public ClassMetricResult applyToClass(org.codehaus.groovy.ast.ClassNode classNode, SourceCode sourceCode)
applyToClass
in interface Metric
protected boolean isNotAnInterface(org.codehaus.groovy.ast.ClassNode classNode)
protected MetricResult createAggregateMetricResult(MetricLevel metricLevel, Collection<MetricResult> childMetricResults, org.codehaus.groovy.ast.ASTNode node)
Copyright © 2022. All rights reserved.