1 /*******************************************************************************
2  * Copyright (c) 2009, 2019 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.core.analysis;
13 
14 /**
15  * Interface for coverage nodes that have individual source lines like methods,
16  * classes and source files.
17  */
18 public interface ISourceNode extends ICoverageNode {
19 
20 	/** Place holder for unknown lines (no debug information) */
21 	int UNKNOWN_LINE = -1;
22 
23 	/**
24 	 * The number of the first line coverage information is available for. If no
25 	 * line is contained, the method returns -1.
26 	 *
27 	 * @return number of the first line or {@link #UNKNOWN_LINE}
28 	 */
getFirstLine()29 	int getFirstLine();
30 
31 	/**
32 	 * The number of the last line coverage information is available for. If no
33 	 * line is contained, the method returns -1.
34 	 *
35 	 * @return number of the last line or {@link #UNKNOWN_LINE}
36 	 */
getLastLine()37 	int getLastLine();
38 
39 	/**
40 	 * Returns the line information for given line.
41 	 *
42 	 * @param nr
43 	 *            line number of interest
44 	 * @return line information
45 	 */
getLine(int nr)46 	ILine getLine(int nr);
47 
48 }
49