use of org.jacoco.report.MultiReportVisitor in project jacoco by jacoco.
the class ReportSupport method initRootVisitor.
public IReportVisitor initRootVisitor() throws IOException {
final IReportVisitor visitor = new MultiReportVisitor(formatters);
visitor.visitInfo(loader.getSessionInfoStore().getInfos(), loader.getExecutionDataStore().getContents());
return visitor;
}
use of org.jacoco.report.MultiReportVisitor in project jacoco by jacoco.
the class Report method createReportVisitor.
private IReportVisitor createReportVisitor() throws IOException, IOException {
final List<IReportVisitor> visitors = new ArrayList<IReportVisitor>();
if (xml != null) {
final XMLFormatter formatter = new XMLFormatter();
visitors.add(formatter.createVisitor(new FileOutputStream(xml)));
}
if (csv != null) {
final CSVFormatter formatter = new CSVFormatter();
visitors.add(formatter.createVisitor(new FileOutputStream(csv)));
}
if (html != null) {
final HTMLFormatter formatter = new HTMLFormatter();
visitors.add(formatter.createVisitor(new FileMultiReportOutput(html)));
}
return new MultiReportVisitor(visitors);
}
Aggregations