GMetrics

Home
Downloads
Change Log

Metrics
Reports

Afferent Coupling Metric

Calculates the Afferent Coupling for a package. This is a count of the number of other packages that depend on the classes within this package. It is an indicator of the package’s responsibility ([1]).

This is a package-level metric.

Implemented by the org.gmetrics.metric.coupling.AfferentCouplingMetric class.

Metric Properties

The following properties can be configured for this metric within a MetricSet. See Creating a MetricSet for information on the syntax of setting a metric property.

Property Description Default Value
enabled This boolean property controls whether the metric is enabled. If set to false, then the metric is not included as part of the results or the output reports. true
functions This List<String> property contains the names of the functions to be calculated at the method, class and package levels and (potentially) included within the report(s). Valid values are: “value” - the value for the current package; “total” - the total value for the current package and its descendant packages; “average” - the average value for the current package and its descendant packages; “referencedFromPackages” - the list of packages that reference classes within the current package. ["value","average"]
ignorePackageNames The names of packages to ignore when calculating afferent coupling. This pattern string may contain wildcard characters (‘*’ or ‘?’); it may also contain more than one pattern, separated by commas. null

References