Package org.somox.metrics.hierarchy
Class PackageMapping
java.lang.Object
org.somox.metrics.abstractmetrics.AbstractMetric
org.somox.metrics.hierarchy.AbstractHierarchyMapping<tools.mdsd.jamopp.model.java.containers.Package>
org.somox.metrics.hierarchy.PackageMapping
- All Implemented Interfaces:
IMetric
public class PackageMapping
extends AbstractHierarchyMapping<tools.mdsd.jamopp.model.java.containers.Package>
PackageMapping metric: Checks how well component candidates are arranged in
the same or at least comparable packages.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetMID()
Returns the Metric ID of the Metricprotected tools.mdsd.jamopp.model.java.containers.Package
getPath
(tools.mdsd.jamopp.model.java.containers.Package element) Return the parent path segment of the passed element Tprotected tools.mdsd.jamopp.model.java.containers.Package
getPath
(tools.mdsd.jamopp.model.java.types.Type clazz) Return the path segment in the subclasses' meaning of hierarchy where this GAST class is directly attached to.Methods inherited from class org.somox.metrics.hierarchy.AbstractHierarchyMapping
internalComputeDirected, isCommutative, isNormalised
Methods inherited from class org.somox.metrics.abstractmetrics.AbstractMetric
calculateUnion, calculateUnion, checkMetricPostCondition, checkMetricPreCondition, computeDirected, getAccessGraphCache, getComponentToClassHelper, getLaunchConfigurationTab, getMetric, getMetricParameters, initialize
-
Field Details
-
METRIC_ID
-
-
Constructor Details
-
PackageMapping
public PackageMapping()
-
-
Method Details
-
getMID
Returns the Metric ID of the Metric- Returns:
- the metric id of the instance
-
getPath
protected tools.mdsd.jamopp.model.java.containers.Package getPath(tools.mdsd.jamopp.model.java.types.Type clazz) Description copied from class:AbstractHierarchyMapping
Return the path segment in the subclasses' meaning of hierarchy where this GAST class is directly attached to. For example, for the directory hierachy, return the directory in which this GAST class is located- Specified by:
getPath
in classAbstractHierarchyMapping<tools.mdsd.jamopp.model.java.containers.Package>
- Parameters:
clazz
- The GASTClass for which to retrieve the path segment- Returns:
- The parent of the GASTClass as defined by our subclass or null if this class is not contained in the hierarchy as defined by the subclass
-
getPath
protected tools.mdsd.jamopp.model.java.containers.Package getPath(tools.mdsd.jamopp.model.java.containers.Package element) Description copied from class:AbstractHierarchyMapping
Return the parent path segment of the passed element T- Specified by:
getPath
in classAbstractHierarchyMapping<tools.mdsd.jamopp.model.java.containers.Package>
- Parameters:
element
- The element (i.e. Directory or Package) for which to return the parent (i.e. parent package or parent directory)- Returns:
- The parent if the element or null if there is no parent
-