ISourceNode.java revision 37115f4ba4f6126b8c3352ac890c653e428a7dd8
1/*******************************************************************************
2 * Copyright (c) 2009, 2013 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 *******************************************************************************/
12package org.jacoco.core.analysis;
13
14/**
15 * Interface for coverage nodes that have individual source lines like methods,
16 * classes and source files.
17 */
18public interface ISourceNode extends ICoverageNode {
19
20	/** Place holder for unknown lines (no debug information) */
21	public static 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	 */
29	public 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	 */
37	public 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	 */
46	public ILine getLine(int nr);
47
48}
49