KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mountainminds > eclemma > core > ICoverageSession


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: ICoverageSession.java 39 2006-08-31 20:37:49Z mho $
7  ******************************************************************************/

8 package com.mountainminds.eclemma.core;
9
10 import org.eclipse.core.runtime.IAdaptable;
11 import org.eclipse.core.runtime.IPath;
12 import org.eclipse.debug.core.ILaunchConfiguration;
13
14 /**
15  * A coverage session is the result of a coverage run (or multiple merged runs)
16  * or coverage data imported from an external source. It is an immutable
17  * container for all data necessary to
18  *
19  * <ul>
20  * <li>provide coverage highlighting in Java editors,</li>
21  * <li>populate the coverage view and</li>
22  * <li>export coverage reports using Emma's reporting capabilities.</li>
23  * </ul>
24  *
25  * This interface is not intended to be implemented by clients.
26  *
27  * @see CoverageTools#createCoverageSession(String, IInstrumentation[],
28  * IPath[], ILaunchConfiguration)
29  *
30  * @author Marc R. Hoffmann
31  * @version $Revision: 39 $
32  */

33 public interface ICoverageSession extends IAdaptable {
34
35   /**
36    * Returns a readable description for this coverage session.
37    *
38    * @return readable description
39    */

40   public String JavaDoc getDescription();
41
42   /**
43    * Returns the array of instrumentation information objects for this session.
44    *
45    * @return array of {@link IInstrumentation} used for this session
46    */

47   public IInstrumentation[] getInstrumentations();
48
49   /**
50    * Returns a list of absolute paths to the Emma coverage data files that
51    * belong to this session.
52    *
53    * @return list of absolute paths to the Emma coverage data files
54    */

55   public IPath[] getCoverageDataFiles();
56
57   /**
58    * If this session was the result of a Eclipse launch this method returns the
59    * respective launch configutation. Otherwise <code>null</code> is returned.
60    *
61    * @return launch configutation or <code>null</code>
62    */

63   public ILaunchConfiguration getLaunchConfiguration();
64   
65   /**
66    * Merges this session with the given session creating a new session with the
67    * given description.
68    *
69    * @param other
70    * Session to merge with
71    * @param description
72    * Name of the new session
73    * @return
74    * New session object merged from this and the given session
75    */

76   public ICoverageSession merge(ICoverageSession other, String JavaDoc description);
77   
78 }
Popular Tags