Package org.jacoco.report

## Class MultiReportVisitor

- java.lang.Object
- - org.jacoco.report.MultiReportVisitor

All Implemented Interfaces:
  `IReportGroupVisitor`, `IReportVisitor`

    public class MultiReportVisitor
    extends java.lang.Object
    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.

### Constructor Summary

Constructors
`MultiReportVisitor​(java.util.List<IReportVisitor> visitors)` New visitor delegating to all given visitors.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `visitBundle​(IBundleCoverage bundle, ISourceFileLocator locator)` Called to add a bundle to the the report.
`void` `visitEnd()` Has to be called after all report data has been emitted.
`IReportGroupVisitor` `visitGroup​(java.lang.String name)` Called to add a new group to the report.
`void` `visitInfo​(java.util.List<SessionInfo> sessionInfos, java.util.Collection<ExecutionData> executionData)` Initializes the report with global information.

### 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`

### 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 interface `IReportVisitor`
Parameters:
  `sessionInfos` - list of chronological ordered `SessionInfo` objects where execution data has been collected for this report.
  `executionData` - collection of all `ExecutionData` 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 interface `IReportVisitor`
Throws:
  `java.io.IOException` - in case of IO problems with the report writer

#### visitBundle

    public void visitBundle​(IBundleCoverage bundle,
                            ISourceFileLocator locator)
                     throws java.io.IOException

Description copied from interface: `IReportGroupVisitor`
Called to add a bundle to the the report.

Specified by:
  `visitBundle` in interface `IReportGroupVisitor`
Parameters:
  `bundle` - a bundle to include in the report
  `locator` - source locator for this bundle
Throws:
  `java.io.IOException` - in case of IO problems with the report writer

#### visitGroup

    public IReportGroupVisitor visitGroup​(java.lang.String name)
                                   throws java.io.IOException

Description copied from interface: `IReportGroupVisitor`
Called to add a new group to the report. The returned `IReportGroupVisitor` instance can be used to add nested bundles or groups. The content of the group has to be completed before this or any parent visitor can be used again ("deep first").

Specified by:
  `visitGroup` in interface `IReportGroupVisitor`
Parameters:
  `name` - name of the group
Returns:
  visitor for the group's content
Throws:
  `java.io.IOException` - in case of IO problems with the report writer