GMetrics - GMetrics - FieldCount Metric

GMetrics

##### General

- Home
- Downloads
- Javadocs
- SourceForge Project

##### Running

- Ant Task Usage
- Other Tools/Frameworks

##### Using

- Creating a MetricSet
- The Default MetricSet

##### Reports

- BasicHtmlReportWriter
- SingleSeriesHtmlReportWriter
- XmlReportWriter
- Sample Reports

##### Metrics

- ABC
- AfferentCoupling
- ClassCount
- ClassLineCount
- CoberturaBranchCoverageMetric
- CoberturaLineCoverageMetric
- CrapMetric
- CyclomaticComplexity
- EfferentCoupling
- FieldCount
- MethodLineCount
- MethodCount

## FieldCount Metric

Metric for counting the number of fields within each class. Note that `static final` fields (i.e., constants) are included as well.

Implemented by the `org.gmetrics.metric.fieldcount.FieldCountMetric` 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: - "total" - "average" - "minimum" - "maximum" | `["total","average"]`