KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > launching > environments > IExecutionEnvironment


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
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  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.launching.environments;
12
13 import org.eclipse.jdt.core.IAccessRule;
14 import org.eclipse.jdt.core.IJavaProject;
15 import org.eclipse.jdt.launching.IVMInstall;
16 import org.eclipse.jdt.launching.LibraryLocation;
17
18 /**
19  * An execution environment describes capabilities of
20  * a Java runtime environment (<code>IVMInstall</code>).
21  * <p>
22  * An execution environment is contributed in plug-in XML via the
23  * <code>org.eclipse.jdt.launching.executionEnvironments</code> extension
24  * point.
25  * </p>
26  * <p>
27  * This interface is not intended to be implemented. Clients contributing
28  * execution environments may provide and implement execution environment
29  * analyzer delegates.
30  * </p>
31  * @since 3.2
32  * @see IExecutionEnvironmentAnalyzerDelegate
33  */

34 public interface IExecutionEnvironment {
35     
36     /**
37      * Returns a unique identifier for this execution environment.
38      * Corresponds to the <code>id</code> attribute in plug-in XML.
39      *
40      * @return unique identifier of this execution environment
41      */

42     public String JavaDoc getId();
43     
44     /**
45      * Returns a brief human-readable description of this environment.
46      *
47      * @return brief human-readable description of this environment.
48      */

49     public String JavaDoc getDescription();
50     
51     /**
52      * Returns a collection of vm installs compatible with this environment,
53      * possibly empty.
54      *
55      * @return a collection of vm installs compatible with this environment,
56      * possibly empty.
57      */

58     public IVMInstall[] getCompatibleVMs();
59     
60     /**
61      * Returns whether the specified vm install is strictly compatible with
62      * this environment. Returns <code>true</code> to indicate the vm install
63      * is strictly compatible with this environment and <code>false</code> to indicate
64      * the vm install represents a superset of this environment.
65      *
66      * @param vm vm install
67      * @return whether the vm install is strictly compatible with this environment
68      */

69     public boolean isStrictlyCompatible(IVMInstall vm);
70     
71     /**
72      * Returns the vm that is used by default for this execution environment,
73      * or <code>null</code> if none.
74      *
75      * @return default vm for this environment or <code>null</code> if none
76      */

77     public IVMInstall getDefaultVM();
78     
79     /**
80      * Sets the vm to use by default for this execution environment.
81      *
82      * @param vm vm to use by default for this execution environment,
83      * or <code>null</code> to clear the default setting
84      * @exception IllegalArgumentException if the given vm is not compatible with
85      * this environment
86      */

87     public void setDefaultVM(IVMInstall vm);
88     
89     /**
90      * Returns a collection of access rules to be applied to the specified VM
91      * libraries for this execution environment in the context of the given project.
92      * An array of access rules is returned for each library specified by
93      * <code>libraries</code>, possibly empty.
94      * <p>
95      * Access rules for an execution environment are defined by access rule participants
96      * contributed in a <code>org.eclipse.jdt.launching.executionEnvironments</code>
97      * extension.
98      * </p>
99      * @param vm the vm that access rules are requested for
100      * @param libraries the libraries that access rules are requested for
101      * @param project the project the access rules are requested for or <code>null</code> if none
102      * @return a collection of arrays of access rules - one array per library
103      * @since 3.3
104      */

105     public IAccessRule[][] getAccessRules(IVMInstall vm, LibraryLocation[] libraries, IJavaProject project);
106 }
107
Popular Tags