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