1
2
3
4 package net.sourceforge.pmd.renderers;
5
6 import java.io.IOException;
7
8 import net.sourceforge.pmd.Report;
9 import net.sourceforge.pmd.util.datasource.DataSource;
10
11
12
13
14
15
16
17
18
19
20
21
22
23 public abstract class AbstractAccumulatingRenderer extends AbstractRenderer {
24
25
26
27
28 protected Report report;
29
30 public AbstractAccumulatingRenderer(String name, String description) {
31 super(name, description);
32 }
33
34
35
36
37 public void start() throws IOException {
38 report = new Report();
39 }
40
41
42
43
44 public void startFileAnalysis(DataSource dataSource) {
45 }
46
47
48
49
50 public void renderFileReport(Report report) throws IOException {
51 this.report.merge(report);
52 }
53
54
55
56
57
58
59 public abstract void end() throws IOException;
60 }