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>metricResultMapprotected Map<String,Set<String>>referencesFromPackageprotected static StringROOT
-
Constructor Summary
Constructors Constructor Description AbstractCouplingReferenceManager(Metric metric)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddReferencesFromPackage(String rawPackageName, Collection<String> rawPackages)protected abstract MutableMapMetricResultcreateEmptyMetricResult()groovy.lang.MetaClassgetMetaClass()MetricgetMetric()MetricResultgetPackageMetricResult(String rawPackageName)ObjectgetProperty(String property)protected Set<String>getReferencesFromPackage(String rawPackageName)ObjectinvokeMethod(String method, Object arguments)protected booleanisSourcePackageOrAncestor(String packageName)protected StringnormalizePackageName(String name)protected StringparentPackageName(String packageName)voidsetMetaClass(groovy.lang.MetaClass mc)voidsetProperty(String property, Object value)protected SortedSetsortPackagesWithReferencesWithParentFirst()protected voidupdateStatisticsForAncestorPackage(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:
getMetaClassin interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClassin interfacegroovy.lang.GroovyObject
-
invokeMethod
public Object invokeMethod(String method, Object arguments)
- Specified by:
invokeMethodin interfacegroovy.lang.GroovyObject
-
getProperty
public Object getProperty(String property)
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject
-
setProperty
public void setProperty(String property, Object value)
- Specified by:
setPropertyin 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)
-
-