Package net.sourceforge.pmd.cpd
Class XMLRenderer
- java.lang.Object
-
- net.sourceforge.pmd.cpd.XMLRenderer
-
- All Implemented Interfaces:
Renderer
,CPDRenderer
public final class XMLRenderer extends Object implements Renderer, CPDRenderer
- 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()
String
render(Iterator<Match> matches)
void
render(Iterator<Match> matches, Writer writer)
void
setEncoding(String encoding)
-
-
-
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(Iterator<Match> matches, Writer writer) throws IOException
- Specified by:
render
in interfaceCPDRenderer
- Throws:
IOException
-
-