Package org.eclipse.tycho.core.ee
Class StandardExecutionEnvironment
- java.lang.Object
-
- org.eclipse.tycho.core.ee.StandardExecutionEnvironment
-
- All Implemented Interfaces:
Comparable<StandardExecutionEnvironment>
,ExecutionEnvironment
public class StandardExecutionEnvironment extends Object implements Comparable<StandardExecutionEnvironment>, ExecutionEnvironment
Represents a standard OSGi execution environment profile. See the list of known OSGi profiles in bundle org.eclipse.osgi, file profile.list. Standard execution environment capabilities can be referenced in MANIFEST.MF using the header "Bundle-RequiredExecutionEnvironment". In order to pick the minimal, required profile from the alternatives listed in a BREE header, instances of this class have a total ordering. TODO This class both represents an EE profile (i.e. the concrete EE implementation used by the compiler) and an EE capability (i.e. the capability required via the BREE). This should be separate classes. (An EE profile typically provides multiple EE capabilities.)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(StandardExecutionEnvironment otherEnv)
boolean
equals(Object obj)
String
getCompilerSourceLevelDefault()
Returns a reasonable compiler source level default for this execution environment.String
getCompilerTargetLevelDefault()
Returns a reasonable compiler target level default for this execution environment.String
getProfileName()
Properties
getProfileProperties()
Set<String>
getSystemPackages()
Returns the list of packages (without versions) provided by the execution environment.int
hashCode()
boolean
isCompatibleCompilerTargetLevel(String target)
Returnsfalse
if classes compiled with the given compiler target level can certainly not be executed on this execution environment.String
toString()
-
-
-
Method Detail
-
getProfileName
public String getProfileName()
- Specified by:
getProfileName
in interfaceExecutionEnvironment
-
getCompilerSourceLevelDefault
public String getCompilerSourceLevelDefault()
Description copied from interface:ExecutionEnvironment
Returns a reasonable compiler source level default for this execution environment.- Specified by:
getCompilerSourceLevelDefault
in interfaceExecutionEnvironment
- Returns:
- a compiler source level matching the execution environment, or
null
if unknown.
-
getCompilerTargetLevelDefault
public String getCompilerTargetLevelDefault()
Description copied from interface:ExecutionEnvironment
Returns a reasonable compiler target level default for this execution environment.- Specified by:
getCompilerTargetLevelDefault
in interfaceExecutionEnvironment
- Returns:
- a compiler target level matching the execution environment, or
null
if unknown.
-
getSystemPackages
public Set<String> getSystemPackages()
Description copied from interface:ExecutionEnvironment
Returns the list of packages (without versions) provided by the execution environment.- Specified by:
getSystemPackages
in interfaceExecutionEnvironment
-
compareTo
public int compareTo(StandardExecutionEnvironment otherEnv)
- Specified by:
compareTo
in interfaceComparable<StandardExecutionEnvironment>
-
getProfileProperties
public Properties getProfileProperties()
- Specified by:
getProfileProperties
in interfaceExecutionEnvironment
-
isCompatibleCompilerTargetLevel
public boolean isCompatibleCompilerTargetLevel(String target)
Description copied from interface:ExecutionEnvironment
Returnsfalse
if classes compiled with the given compiler target level can certainly not be executed on this execution environment. Used to detect inconsistent configuration.- Specified by:
isCompatibleCompilerTargetLevel
in interfaceExecutionEnvironment
-
-