Package org.gmetrics.metric.coupling
Class AbstractCouplingReferenceManager
- java.lang.Object
-
- org.gmetrics.metric.coupling.AbstractCouplingReferenceManager
-
- All Implemented Interfaces:
groovy.lang.GroovyObject
- Direct Known Subclasses:
AfferentCouplingReferenceManager
,EfferentCouplingReferenceManager
public abstract class AbstractCouplingReferenceManager extends Object implements groovy.lang.GroovyObject
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,MutableMapMetricResult>
metricResultMap
protected Map<String,Set<String>>
referencesFromPackage
protected static String
ROOT
-
Constructor Summary
Constructors Constructor Description AbstractCouplingReferenceManager(Metric metric)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addReferencesFromPackage(String rawPackageName, Collection<String> rawPackages)
protected abstract MutableMapMetricResult
createEmptyMetricResult()
groovy.lang.MetaClass
getMetaClass()
Metric
getMetric()
MetricResult
getPackageMetricResult(String rawPackageName)
Object
getProperty(String property)
protected Set<String>
getReferencesFromPackage(String rawPackageName)
Object
invokeMethod(String method, Object arguments)
protected boolean
isSourcePackageOrAncestor(String packageName)
protected String
normalizePackageName(String name)
protected String
parentPackageName(String packageName)
void
setMetaClass(groovy.lang.MetaClass mc)
void
setProperty(String property, Object value)
protected SortedSet
sortPackagesWithReferencesWithParentFirst()
protected void
updateStatisticsForAncestorPackage(String packageName, int addToTotal, int addToCount)
-
-
-
Field Detail
-
ROOT
protected static final String ROOT
- See Also:
- Constant Field Values
-
metricResultMap
protected Map<String,MutableMapMetricResult> metricResultMap
-
-
Constructor Detail
-
AbstractCouplingReferenceManager
public AbstractCouplingReferenceManager(Metric metric)
-
-
Method Detail
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClass
in interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClass
in interfacegroovy.lang.GroovyObject
-
invokeMethod
public Object invokeMethod(String method, Object arguments)
- Specified by:
invokeMethod
in interfacegroovy.lang.GroovyObject
-
getProperty
public Object getProperty(String property)
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
-
setProperty
public void setProperty(String property, Object value)
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
-
getMetric
public final Metric getMetric()
-
createEmptyMetricResult
protected abstract MutableMapMetricResult createEmptyMetricResult()
-
addReferencesFromPackage
public void addReferencesFromPackage(String rawPackageName, Collection<String> rawPackages)
-
getPackageMetricResult
public MetricResult getPackageMetricResult(String rawPackageName)
-
isSourcePackageOrAncestor
protected boolean isSourcePackageOrAncestor(String packageName)
-
sortPackagesWithReferencesWithParentFirst
protected SortedSet sortPackagesWithReferencesWithParentFirst()
-
updateStatisticsForAncestorPackage
protected void updateStatisticsForAncestorPackage(String packageName, int addToTotal, int addToCount)
-
-