Package org.jacoco.report
Class MultiReportVisitor
- java.lang.Object
-
- org.jacoco.report.MultiGroupVisitor
-
- org.jacoco.report.MultiReportVisitor
-
- All Implemented Interfaces:
IReportGroupVisitor
,IReportVisitor
public class MultiReportVisitor extends MultiGroupVisitor implements IReportVisitor
A report visitor that is composed from multiple other visitors. This can be used to create more than one report format in one run.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<IReportVisitor>
visitors
-
Constructor Summary
Constructors Constructor Description MultiReportVisitor(java.util.List<IReportVisitor> visitors)
New visitor delegating to all given visitors.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visitEnd()
Has to be called after all report data has been emitted.void
visitInfo(java.util.List<SessionInfo> sessionInfos, java.util.Collection<ExecutionData> executionData)
Initializes the report with global information.-
Methods inherited from class org.jacoco.report.MultiGroupVisitor
visitBundle, visitGroup
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jacoco.report.IReportGroupVisitor
visitBundle, visitGroup
-
-
-
-
Field Detail
-
visitors
private final java.util.List<IReportVisitor> visitors
-
-
Constructor Detail
-
MultiReportVisitor
public MultiReportVisitor(java.util.List<IReportVisitor> visitors)
New visitor delegating to all given visitors.- Parameters:
visitors
- visitors to delegate to
-
-
Method Detail
-
visitInfo
public void visitInfo(java.util.List<SessionInfo> sessionInfos, java.util.Collection<ExecutionData> executionData) throws java.io.IOException
Description copied from interface:IReportVisitor
Initializes the report with global information. This method has to be called before any other method can be called.- Specified by:
visitInfo
in interfaceIReportVisitor
- Parameters:
sessionInfos
- list of chronological orderedSessionInfo
objects where execution data has been collected for this report.executionData
- collection of allExecutionData
objects that are considered for this report- Throws:
java.io.IOException
- in case of IO problems with the report writer
-
visitEnd
public void visitEnd() throws java.io.IOException
Description copied from interface:IReportVisitor
Has to be called after all report data has been emitted.- Specified by:
visitEnd
in interfaceIReportVisitor
- Throws:
java.io.IOException
- in case of IO problems with the report writer
-
-