GMetrics

The GMetrics project provides calculation and reporting of size and complexity metrics for Groovy source code. GMetrics scans Groovy source code, applying a set of metrics, and generates an HTML report of the results.

This project is maintained by dx42

Efferent Coupling Metric

Calculates the Efferent Coupling for a package. This is a count of the number of other packages that the classes in a package depend upon, and is an indicator of the package’s independence ([1]). This is a package-level metric.

Implemented by the org.gmetrics.metric.coupling.EfferentCouplingMetric 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