MetricsReportWriter@NotThreadSafe public class XslReportWriter extends java.lang.Object implements MetricsReportWriter
XslReportWriter creates metrics reports by applying an XSL transformation to an
XML report produced by an XmlReportWriter. The report is written to an
OutputStream.
Instances of this class are not safe for use by multiple threads without external synchronization.
| Constructor | Description |
|---|---|
XslReportWriter(java.io.OutputStream pOutputStream,
java.io.File pXslFile) |
Create a new
XslReportWriter that gets its XSL style sheet from a file. |
XslReportWriter(java.io.OutputStream pOutputStream,
java.lang.String pXslResource) |
Create a new
XslReportWriter that gets its XSL style sheet from a classpath resource. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
writeReport(JavaMetrics pMetrics,
MetricsReportMetaData pMetaData) |
Write a report for the source code metrics in a
JavaMetrics instance. |
public XslReportWriter(@Nonnull
java.io.OutputStream pOutputStream,
@Nonnull
java.io.File pXslFile)
XslReportWriter that gets its XSL style sheet from a file.pOutputStream - The stream to write the report to.pXslFile - A file containing the XSL style sheet to create the report with.java.lang.NullPointerException - if any of the parameters is null.public XslReportWriter(@Nonnull
java.io.OutputStream pOutputStream,
@Nonnull
java.lang.String pXslResource)
XslReportWriter that gets its XSL style sheet from a classpath resource.pOutputStream - The stream to write the report to.pXslResource - The name of the resource containing the XSL style sheet.java.lang.NullPointerException - if any of the parameters is null.public void writeReport(@Nonnull
JavaMetrics pMetrics,
@Nonnull
MetricsReportMetaData pMetaData)
throws java.io.IOException
MetricsReportWriterJavaMetrics instance.writeReport in interface MetricsReportWriterpMetrics - The metrics to get the report data from.pMetaData - The report's meta data.java.io.IOException - if writing the report fails.