Class PackageMapping

java.lang.Object
org.somox.metrics.abstractmetrics.AbstractMetric
org.somox.metrics.hierarchy.AbstractHierarchyMapping<org.emftext.language.java.containers.Package>
org.somox.metrics.hierarchy.PackageMapping
All Implemented Interfaces:
IMetric

public class PackageMapping extends AbstractHierarchyMapping<org.emftext.language.java.containers.Package>
PackageMapping metric: Checks how well component candidates are arranged in the same or at least comparable packages.
  • Field Details

    • METRIC_ID

      public static final MetricID METRIC_ID
  • Constructor Details

    • PackageMapping

      public PackageMapping()
  • Method Details

    • getMID

      public MetricID getMID()
      Returns the Metric ID of the Metric
      Returns:
      the metric id of the instance
    • getPath

      protected org.emftext.language.java.containers.Package getPath(org.emftext.language.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 class AbstractHierarchyMapping<org.emftext.language.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 org.emftext.language.java.containers.Package getPath(org.emftext.language.java.containers.Package element)
      Description copied from class: AbstractHierarchyMapping
      Return the parent path segment of the passed element T
      Specified by:
      getPath in class AbstractHierarchyMapping<org.emftext.language.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