19
10
@import url("./css/site.css");
21
12
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
22
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
13
<meta name="Date-Revision-yyyymmdd" content="20120116" />
14
<meta http-equiv="Content-Language" content="en" />
24
17
<body class="composite">
26
19
<a href="" id="bannerLeft">
31
22
<div class="clear">
35
26
<div id="breadcrumbs">
45
Last Published: 23 Jul 2010
30
<span id="publishDate">Last Published: 16 Jan 2012</span>
31
| <span id="projectVersion">Version: 0.5</span>
56
36
<div class="clear">
60
40
<div id="leftColumn">
61
41
<div id="navcolumn">
74
<a href="index.html">Home</a>
78
<a href="http://sourceforge.net/projects/gmetrics/files/" class="externalLink">Downloads</a>
82
<a href="gmetrics-roadmap.html">Road Map</a>
86
<a href="apidocs/index.html">Javadocs</a>
90
<a href="http://sourceforge.net/projects/gmetrics" class="externalLink">SourceForge Project</a>
97
<a href="gmetrics-ant-task.html">Ant Task Usage</a>
101
<a href="gmetrics-other-tools-frameworks.html">Other Tools/Frameworks</a>
108
<a href="gmetrics-creating-metricset.html">Creating a MetricSet</a>
112
<a href="gmetrics-DefaultMetricSet.html">The Default MetricSet</a>
119
<strong>BasicHtmlReportWriter</strong>
123
<a href="gmetrics-SingleSeriesHtmlReportWriter.html">SingleSeriesHtmlReportWriter</a>
127
<a href="gmetrics-XmlReportWriter.html">XmlReportWriter</a>
131
<a href="SampleGMetricsReport.html">Sample HTML Report</a>
135
<a href="SampleGMetricsSingleSeriesReport.html">Sample Single-Series HTML Report</a>
139
<a href="SampleGMetricsXmlReport.xml">Sample XML Report</a>
146
<a href="gmetrics-AbcMetric.html">ABC</a>
150
<a href="gmetrics-ClassLineCountMetric.html">ClassLineCount</a>
154
<a href="gmetrics-CyclomaticComplexityMetric.html">Cyclomatic Complexity</a>
158
<a href="gmetrics-MethodLineCountMetric.html">MethodLineCount</a>
161
<h5>Project Documentation</h5>
170
<li class="collapsed">
171
<a href="project-info.html">Project Information</a>
178
<li class="collapsed">
179
<a href="project-reports.html">Project Reports</a>
185
<a href="http://sourceforge.net" title="Hosted on SourceForge.net" class="poweredBy">
186
<img alt="Hosted on SourceForge.net" src="http://sflogo.sourceforge.net/sflogo.php?group_id=208647&type=2" />
191
<a href="http://maven.apache.org" title="Build with Maven 2" class="poweredBy">
192
<img alt="Build with Maven 2" src="images/logos/maven-feather.png" />
47
<a href="index.html" title="Home">Home</a>
50
<a href="http://sourceforge.net/projects/gmetrics/files/" class="externalLink" title="Downloads">Downloads</a>
53
<a href="apidocs/index.html" title="Javadocs">Javadocs</a>
56
<a href="http://sourceforge.net/projects/gmetrics" class="externalLink" title="SourceForge Project">SourceForge Project</a>
62
<a href="gmetrics-ant-task.html" title="Ant Task Usage">Ant Task Usage</a>
65
<a href="gmetrics-other-tools-frameworks.html" title="Other Tools/Frameworks">Other Tools/Frameworks</a>
71
<a href="gmetrics-creating-metricset.html" title="Creating a MetricSet">Creating a MetricSet</a>
74
<a href="gmetrics-DefaultMetricSet.html" title="The Default MetricSet">The Default MetricSet</a>
80
<strong>BasicHtmlReportWriter</strong>
83
<a href="gmetrics-SingleSeriesHtmlReportWriter.html" title="SingleSeriesHtmlReportWriter">SingleSeriesHtmlReportWriter</a>
86
<a href="gmetrics-XmlReportWriter.html" title="XmlReportWriter">XmlReportWriter</a>
89
<a href="gmetrics-sampleReports.html" title="Sample Reports">Sample Reports</a>
95
<a href="gmetrics-AbcMetric.html" title="ABC">ABC</a>
98
<a href="gmetrics-ClassCountMetric.html" title="ClassCount">ClassCount</a>
101
<a href="gmetrics-ClassLineCountMetric.html" title="ClassLineCount">ClassLineCount</a>
104
<a href="gmetrics-CoberturaBranchCoverageMetric.html" title="CoberturaBranchCoverageMetric">CoberturaBranchCoverageMetric</a>
107
<a href="gmetrics-CoberturaLineCoverageMetric.html" title="CoberturaLineCoverageMetric">CoberturaLineCoverageMetric</a>
110
<a href="gmetrics-CrapMetric.html" title="CrapMetric">CrapMetric</a>
113
<a href="gmetrics-CyclomaticComplexityMetric.html" title="CyclomaticComplexity">CyclomaticComplexity</a>
116
<a href="gmetrics-FieldCountMetric.html" title="FieldCount">FieldCount</a>
119
<a href="gmetrics-MethodLineCountMetric.html" title="MethodLineCount">MethodLineCount</a>
122
<a href="gmetrics-MethodCountMetric.html" title="MethodCount">MethodCount</a>
125
<h5>Project Documentation</h5>
127
<li class="collapsed">
128
<a href="project-info.html" title="Project Information">Project Information</a>
130
<li class="collapsed">
131
<a href="project-reports.html" title="Project Reports">Project Reports</a>
134
<a href="http://sourceforge.net" title="Hosted on SourceForge.net" class="poweredBy">
135
<img class="poweredBy" alt="Hosted on SourceForge.net" src="http://sflogo.sourceforge.net/sflogo.php?group_id=208647&type=2" />
137
<a href="http://maven.apache.org" title="Build with Maven 2" class="poweredBy">
138
<img class="poweredBy" alt="Build with Maven 2" src="images/logos/maven-feather.png" />
204
144
<div id="bodyColumn">
205
145
<div id="contentBox">
206
<div class="section"><h2>BasicHtmlReportWriter</h2>
207
<div class="section"><h3>Description</h3>
208
<p>The <tt>org.gmetrics.report.BasicHtmlReportWriter</tt> class produces an HTML report of metric results in a single HTML table, with one row for each package, class or method (or closure field) and one column for each metric value (function) being calculated.</p>
209
<p>See a <a href="SampleGMetricsReport.html">Sample Report</a>.</p>
211
<div class="section"><h3>Option Nested Elements</h3>
212
<p>The <b>option</b> element is a child of the <b>report</b> element and defines a report-specific option for a report.</p>
213
<p><tt>org.gmetrics.report.BasicHtmlReportWriter</tt> supports the following options:</p>
214
<table class="bodyTable"><tbody><tr class="a"><td align="left"><b>Attribute</b></td>
215
<td align="left"><b>Description</b></td>
216
<td align="left"><b>Required</b></td>
218
<tr class="b"><td align="left">functions</td>
219
<td align="left">The (comma-separated) list of functions for which results are<br />
220
included in the report for a particular metric. Multiple<br />
221
metrics are configured by separating them with semicolons (;).<br />
222
By default, all functions provided by a metric are included<br />
223
within the report. Any metrics not explicitly configured<br />
224
include all applicable functions as well.<br />
226
Valid <i>function</i> values are metric-specific, but typically<br />
227
include "total", "average", "minimum" and "maximum".<br />
229
For example, a value of <tt>"MethodLineCount=minimum,average"</tt><br />
230
for <tt>functions</tt> includes only the <i>minimum</i> and <i>average</i><br />
231
function results for the <b>MethodLineCount</b> metric. Likewise,<br />
232
a value of <tt>"ABC=average; CyclomaticComplexity=total,maximum"</tt><br />
233
includes the <i>average</i> function results for the <b>ABC</b> metric<br />
234
and the <i>total</i> and <i>maximum</i> function results for the<br />
235
<b>CyclomaticComplexity</b> metric. Note that all functions<br />
236
provided by any other metrics (not configured) are included.</td>
237
<td align="left">No</td>
239
<tr class="a"><td align="left">levels</td>
240
<td align="left">The (comma-separated) list of levels at which results are<br />
241
included in the report for a particular metric. Multiple<br />
242
metrics are configured by separating them with semicolons (;).<br />
243
By default, all levels are included for all metrics within the<br />
244
report. Any metrics not explicitly configured include all<br />
245
applicable levels as well.<br />
247
Valid <i>level</i> values are "package", "class" and "method".<br />
249
For example, a value of <tt>"MethodLineCount=class,method"</tt> for<br />
250
<tt>levels</tt> includes only the <i>class</i> and <i>method</i> level<br />
251
results for the <b>MethodLineCount</b> metric. Likewise, a value<br />
252
of <tt>"ABC=method; CyclomaticComplexity=package,class"</tt> includes<br />
253
the <i>method</i> level results for the <b>ABC</b> metric and the<br />
254
<i>package</i> and <i>class</i> level results for the <b>CyclomaticComplexity</b><br />
255
metric. Note that all levels are included for any other metrics<br />
256
not explicitly configured.</td>
257
<td align="left">No</td>
259
<tr class="b"><td align="left">metrics</td>
260
<td align="left">The (comma-separated) list of names of the metrics included<br />
261
in the report. By default, all metrics within the results are<br />
262
included in the report.<br />
264
For example, a <tt>metrics</tt> value of <tt>"ABC, MethodLineCount"</tt><br />
265
includes only the <b>ABC</b> and <b>MethodLineCount</b> metrics<br />
266
within the report.</td>
267
<td align="left">No</td>
269
<tr class="a"><td align="left">outputFile</td>
270
<td align="left">The path and filename for the output report file.</td>
271
<td align="left">No</td>
273
<tr class="b"><td align="left">title</td>
274
<td align="left">The title for the output report.</td>
275
<td align="left">No</td>
277
<tr class="a"><td align="left">writeToStandardOut</td>
278
<td align="left">Set to "true" or <tt>true</tt> to write out the report to<br />
279
<i>stdout</i> (<tt>System.out</tt>) instead of writing to a file.</td>
280
<td align="left">No</td>
285
<div class="section"><h3>Example</h3>
286
<p>Here is an example Ant XML build file illustrating configuration of <tt>org.gmetrics.report.BasicHtmlReportWriter</tt>.</p>
287
<div class="source"><pre><taskdef name="gmetrics" classname="org.gmetrics.ant.GMetricsTask">
146
<div class="section"><h2>BasicHtmlReportWriter<a name="BasicHtmlReportWriter"></a></h2><!-- ~~~~~~~~~~~~~~~~~~~ --><div class="section"><h3>Description<a name="Description"></a></h3><!-- ~~~~~~~~~~~ --><p>The <tt>org.gmetrics.report.BasicHtmlReportWriter</tt> class produces an HTML report of metric results in a single HTML table, with one row for each package, class or method (or closure field) and one column for each metric value (function) being calculated.</p><p>See a <a href="./SampleGMetricsReport.html">Sample Report</a>.</p></div><div class="section"><h3>Option Nested Elements<a name="Option_Nested_Elements"></a></h3><!-- ~~~~~~~~~~~~~~~~~~~~~~ --><p>The <b>option</b> element is a child of the <b>report</b> element and defines a report-specific option for a report.</p><p><tt>org.gmetrics.report.BasicHtmlReportWriter</tt> supports the following options:</p><table border="1" class="bodyTable"><tr class="a"><td align="left"><b>Attribute</b></td><td align="left"><b>Description</b></td><td align="left"><b>Required</b></td></tr><tr class="b"><td align="left">functions</td><td align="left">The (comma-separated) list of functions for which results are included in the report for a particular metric. Multiple metrics are configured by separating them with semicolons (;). By default, all functions provided by a metric are included within the report. Any metrics not explicitly configured include all applicable functions as well. ---- Valid <i>function</i> values are metric-specific, but typically include "total", "average", "minimum" and "maximum". ---- For example, a value of <tt>"MethodLineCount=minimum,average"</tt> for <tt>functions</tt> includes only the <i>minimum</i> and <i>average</i> function results for the <b>MethodLineCount</b> metric. Likewise, a value of <tt>"ABC=average; CyclomaticComplexity=total,maximum"</tt> includes the <i>average</i> function results for the <b>ABC</b> metric and the <i>total</i> and <i>maximum</i> function results for the <b>CyclomaticComplexity</b> metric. Note that all functions provided by any other metrics (not configured) are included.</td><td align="left">No</td></tr><tr class="a"><td align="left">levels</td><td align="left">The (comma-separated) list of levels at which results are included in the report for a particular metric. Multiple metrics are configured by separating them with semicolons (;). By default, all levels are included for all metrics within the report. Any metrics not explicitly configured include all applicable levels as well. ---- Valid <i>level</i> values are "package", "class" and "method". ---- For example, a value of <tt>"MethodLineCount=class,method"</tt> for <tt>levels</tt> includes only the <i>class</i> and <i>method</i> level results for the <b>MethodLineCount</b> metric. Likewise, a value of <tt>"ABC=method; CyclomaticComplexity=package,class"</tt> includes the <i>method</i> level results for the <b>ABC</b> metric and the <i>package</i> and <i>class</i> level results for the <b>CyclomaticComplexity</b> metric. Note that all levels are included for any other metrics not explicitly configured.</td><td align="left">No</td></tr><tr class="b"><td align="left">metrics</td><td align="left">The (comma-separated) list of names of the metrics included in the report. By default, all metrics within the results are included in the report. ---- For example, a <tt>metrics</tt> value of <tt>"ABC, MethodLineCount"</tt> includes only the <b>ABC</b> and <b>MethodLineCount</b> metrics within the report.</td><td align="left">No</td></tr><tr class="a"><td align="left">outputFile</td><td align="left">The path and filename for the output report file.</td><td align="left">No</td></tr><tr class="b"><td align="left">title</td><td align="left">The title for the output report.</td><td align="left">No</td></tr><tr class="a"><td align="left">writeToStandardOut</td><td align="left">Set to "true" or <tt>true</tt> to write out the report to <i>stdout</i> (<tt>System.out</tt>) instead of writing to a file.</td><td align="left">No</td></tr></table></div><div class="section"><h3>Example<a name="Example"></a></h3><!-- ~~~~~~~ --><p>Here is an example Ant XML build file illustrating configuration of <tt>org.gmetrics.report.BasicHtmlReportWriter</tt>.</p><div class="source"><pre><taskdef name="gmetrics" classname="org.gmetrics.ant.GMetricsTask">
288
147
<target name="runGMetrics">