Class DirectoryMapping

java.lang.Object
org.somox.metrics.abstractmetrics.AbstractMetric
org.somox.metrics.hierarchy.AbstractHierarchyMapping<tools.mdsd.jamopp.model.java.containers.Package>
org.somox.metrics.hierarchy.DirectoryMapping
All Implemented Interfaces:
IMetric

public class DirectoryMapping extends AbstractHierarchyMapping<tools.mdsd.jamopp.model.java.containers.Package>
DirectoryMapping metric: Checks how well are component candidates are arranged in the same or at least comparable directory.
  • Field Details

    • METRIC_ID

      public static final MetricID METRIC_ID
  • Constructor Details

    • DirectoryMapping

      public DirectoryMapping()
  • Method Details

    • getMID

      public MetricID 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 class AbstractHierarchyMapping<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 class AbstractHierarchyMapping<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