1 /******************************************************************************* 2 * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors 3 * This program and the accompanying materials are made available under 4 * the terms of the Eclipse Public License 2.0 which is available at 5 * http://www.eclipse.org/legal/epl-2.0 6 * 7 * SPDX-License-Identifier: EPL-2.0 8 * 9 * Contributors: 10 * Marc R. Hoffmann - initial API and implementation 11 * 12 *******************************************************************************/ 13 package org.jacoco.report; 14 15 import java.io.IOException; 16 import java.util.Collection; 17 import java.util.List; 18 19 import org.jacoco.core.data.IExecutionData; 20 import org.jacoco.core.data.SessionInfo; 21 22 /** 23 * Interface for all implementations to retrieve structured report data. Unlike 24 * nested {@link IReportGroupVisitor} instances the root visitor accepts exactly 25 * one bundle or group. 26 */ 27 public interface IReportVisitor extends IReportGroupVisitor { 28 29 /** 30 * Initializes the report with global information. This method has to be 31 * called before any other method can be called. 32 * 33 * @param sessionInfos 34 * list of chronological ordered {@link SessionInfo} objects 35 * where execution data has been collected for this report. 36 * @param executionData 37 * collection of all {@link ExecutionData} objects that are 38 * considered for this report 39 * @throws IOException 40 * in case of IO problems with the report writer 41 */ visitInfo(List<SessionInfo> sessionInfos, Collection<IExecutionData> executionData)42 void visitInfo(List<SessionInfo> sessionInfos, 43 // BEGIN android-change 44 Collection<IExecutionData> executionData) throws IOException; 45 // END android-change 46 47 /** 48 * Has to be called after all report data has been emitted. 49 * 50 * @throws IOException 51 * in case of IO problems with the report writer 52 */ visitEnd()53 void visitEnd() throws IOException; 54 55 } 56