KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > pmd > renderers > AbstractRenderer


1 package net.sourceforge.pmd.renderers;
2
3 import java.io.IOException JavaDoc;
4 import java.io.StringWriter JavaDoc;
5
6 import net.sourceforge.pmd.Report;
7
8 public abstract class AbstractRenderer implements Renderer {
9
10     protected boolean showSuppressedViolations = true;
11
12     public void showSuppressedViolations(boolean show) {
13         this.showSuppressedViolations = show;
14     }
15
16     public String JavaDoc render(Report report) {
17         StringWriter JavaDoc w = new StringWriter JavaDoc();
18         try {
19             render(w, report);
20         } catch (IOException JavaDoc e) {
21             throw new Error JavaDoc("StringWriter doesn't throw IOException", e);
22         }
23         return w.toString();
24     }
25
26 }
27
Popular Tags