• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  *    Evgeny Mandrikov - initial API and implementation
11  *
12  *******************************************************************************/
13 package org.jacoco.core.internal.analysis.filter;
14 
15 import java.util.Set;
16 
17 import org.objectweb.asm.tree.AbstractInsnNode;
18 
19 /**
20  * Interface used by filters to mark filtered items.
21  */
22 public interface IFilterOutput {
23 
24 	/**
25 	 * Marks sequence of instructions that should be ignored during computation
26 	 * of coverage.
27 	 *
28 	 * @param fromInclusive
29 	 *            first instruction that should be ignored, inclusive
30 	 * @param toInclusive
31 	 *            last instruction coming after <code>fromInclusive</code> that
32 	 *            should be ignored, inclusive
33 	 */
ignore(AbstractInsnNode fromInclusive, AbstractInsnNode toInclusive)34 	void ignore(AbstractInsnNode fromInclusive, AbstractInsnNode toInclusive);
35 
36 	/**
37 	 * Marks two instructions that should be merged during computation of
38 	 * coverage.
39 	 *
40 	 * @param i1
41 	 *            first instruction
42 	 * @param i2
43 	 *            second instruction
44 	 */
merge(AbstractInsnNode i1, AbstractInsnNode i2)45 	void merge(AbstractInsnNode i1, AbstractInsnNode i2);
46 
47 	/**
48 	 * Marks instruction whose outgoing branches should be replaced during
49 	 * computation of coverage.
50 	 *
51 	 * @param source
52 	 *            instruction which branches should be replaced
53 	 * @param newTargets
54 	 *            new targets of branches
55 	 */
replaceBranches(AbstractInsnNode source, Set<AbstractInsnNode> newTargets)56 	void replaceBranches(AbstractInsnNode source,
57 			Set<AbstractInsnNode> newTargets);
58 
59 }
60