KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mountainminds > eclemma > core > analysis > ILineCoverage


1 /*******************************************************************************
2  * Copyright (c) 2006 Mountainminds GmbH & Co. KG
3  * This software is provided under the terms of the Eclipse Public License v1.0
4  * See http://www.eclipse.org/legal/epl-v10.html.
5  *
6  * $Id: ILineCoverage.java 11 2006-08-28 20:06:31Z mho $
7  ******************************************************************************/

8 package com.mountainminds.eclemma.core.analysis;
9
10 /**
11  * For all elements that sit in a compilation unit and for compilation units
12  * itself individual line coverage may be described by this interface. This
13  * interface is not intended to be implemented or extended by clients.
14  *
15  * @see IJavaElementCoverage#getLineCoverage()
16  *
17  * @author Marc R. Hoffmann
18  * @version $Revision: 11 $
19  */

20 public interface ILineCoverage extends ICounter {
21
22   /** Flag for lines that do not contain code (value is 0x00). */
23   public static final byte NO_CODE = 0x00;
24
25   /** Flag for lines that are not covered (value is 0x01). */
26   public static final byte NOT_COVERED = 0x01;
27
28   /** Flag for lines that are fully covered (value is 0x02). */
29   public static final byte FULLY_COVERED = 0x02;
30
31   /** Flag for lines that are partly covered (value is 0x03). */
32   public static final byte PARTLY_COVERED = NOT_COVERED | FULLY_COVERED;
33
34   /**
35    * The number of the first line coverage information is available for.
36    *
37    * @return number of the first line
38    */

39   public int getFirstLine();
40
41   /**
42    * The number of the last line coverage information is available for.
43    *
44    * @return number of the last line
45    */

46   public int getLastLine();
47
48   /**
49    * Returns the line number of the first entry in the array returned by
50    * {@link #getCoverage()}.
51    *
52    * @return offset of the coverage data array
53    */

54   public int getOffset();
55
56   /**
57    * Returns an array of coverage flags defined as constants in this interface.
58    * The first item of the returned array corresponds to the line returned by
59    * {@link #getOffset()}. Note that the length of the array may superceed the
60    * actual source file length.
61    *
62    * @see #NO_CODE
63    * @see #NOT_COVERED
64    * @see #PARTLY_COVERED
65    * @see #FULLY_COVERED
66    *
67    * @return array of coverage flags
68    */

69   public byte[] getCoverage();
70
71 }
72
Popular Tags