Package net.sourceforge.pmd.cpd
Class XMLRenderer
- java.lang.Object
-
- net.sourceforge.pmd.cpd.XMLRenderer
-
- All Implemented Interfaces:
CPDReportRenderer
public final class XMLRenderer extends Object implements CPDReportRenderer
- Author:
- Philippe T'Seyen - original implementation, Romain Pelisse - javax.xml implementation
-
-
Constructor Summary
Constructors Constructor Description XMLRenderer()
Creates a XML Renderer with the default (platform dependent) encoding.XMLRenderer(String encoding)
Creates a XML Renderer with a specific output encoding.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getEncoding()
void
render(CPDReport report, Writer writer)
Write out the contents of the report to the given writer.void
setEncoding(String encoding)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.cpd.CPDReportRenderer
renderToString
-
-
-
-
Constructor Detail
-
XMLRenderer
public XMLRenderer()
Creates a XML Renderer with the default (platform dependent) encoding.
-
XMLRenderer
public XMLRenderer(String encoding)
Creates a XML Renderer with a specific output encoding.- Parameters:
encoding
- the encoding to use or null. If null, default (platform dependent) encoding is used.
-
-
Method Detail
-
setEncoding
public void setEncoding(String encoding)
-
getEncoding
public String getEncoding()
-
render
public void render(CPDReport report, Writer writer) throws IOException
Description copied from interface:CPDReportRenderer
Write out the contents of the report to the given writer.- Specified by:
render
in interfaceCPDReportRenderer
- Parameters:
report
- The report to writewriter
- A writer for the report file- Throws:
IOException
- If the writer throws
-
-