KickJava   Java API By Example, From Geeks To Geeks.

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


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: ISourceLocation.java 11 2006-08-28 20:06:31Z mho $
7  ******************************************************************************/

8 package com.mountainminds.eclemma.core;
9
10 import org.eclipse.core.runtime.CoreException;
11 import org.eclipse.core.runtime.IPath;
12 import org.eclipse.core.runtime.IProgressMonitor;
13
14 /**
15  * Reference to a location where Java source code is stored. This information
16  * is used for Emma report generation.
17  *
18  * @author Marc R. Hoffmann
19  * @version $Revision: 11 $
20  */

21 public interface ISourceLocation {
22
23   /**
24    * Returns the absolute path to the source folder or archive.
25    *
26    * @return absolute path to the source folder or archive
27    */

28   public IPath getPath();
29
30   /**
31    * Determines whether this source location points to an archive.
32    *
33    * @return <code>true</code> if this source location is an archive
34    */

35   public boolean isArchive();
36
37   /**
38    * Returns the path within the source archive where package fragments are
39    * located. An empty path indicates that packages are located at the root of
40    * the source archive or folder. Returns a non-<code>null</code> value if
41    * and only if {@link #isArchive()} returns <code>true</code>.
42    *
43    * @return the path within the source archive, or <code>null</code> if not
44    * applicable
45    */

46   public IPath getRootPath();
47
48   /**
49    * If this source location points to an archive, calling this method will
50    * extract the source files to an temporary local folder. The properties of
51    * this descriptor object will be updated to the new location. If the source
52    * files are already extracted this method does nothing.
53    *
54    * @param monitor
55    * progress monitor or <code>null</code>
56    * @throws CoreException
57    * Thrown if the archive content can't be extracted.
58    */

59   public void extract(IProgressMonitor monitor) throws CoreException;
60
61 }
62
Popular Tags