Class AfferentCoupling

All Implemented Interfaces:
IMetric

public class AfferentCoupling extends AbstractCountingMetric
Afferent coupling (Ca): The number of types outside this assembly that depend on types within this assembly. High afferent coupling indicates that the concerned assemblies have many responsibilities. see http://www.ndepend.com/Metrics.aspx#AfferentCoupling
  • Field Details

    • METRIC_ID

      public static final MetricID METRIC_ID
  • Constructor Details

    • AfferentCoupling

      public AfferentCoupling()
  • Method Details

    • internalComputeDirected

      protected void internalComputeDirected(ClusteringRelation relationToCompute)
      Description copied from class: AbstractMetric
      Template method to be implemented by subclasses to effectively compute the metric value
      Specified by:
      internalComputeDirected in class AbstractMetric
      Parameters:
      relationToCompute - The relation to compute
    • getMID

      public MetricID getMID()
      Description copied from interface: IMetric
      Returns the Metric ID of the Metric
      Returns:
      the metric id of the instance
    • isCommutative

      public boolean isCommutative()
      Specified by:
      isCommutative in interface IMetric
      Specified by:
      isCommutative in class AbstractMetric
      Returns:
      true if the metric gives the same result if firstComponent and secondComponent are swapped