Class StandardExecutionEnvironment

  • All Implemented Interfaces:
    java.lang.Comparable<StandardExecutionEnvironment>, ExecutionEnvironment

    public class StandardExecutionEnvironment
    extends java.lang.Object
    implements java.lang.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.)
    • Field Detail

      • TARGET_ALIASES

        private static final java.util.Map<java.lang.String,​java.lang.String> TARGET_ALIASES
      • profileName

        private java.lang.String profileName
      • compilerSourceLevel

        private java.lang.String compilerSourceLevel
      • compilerTargetLevel

        private java.lang.String compilerTargetLevel
      • systemPackages

        private java.util.Set<java.lang.String> systemPackages
      • profileProperties

        private java.util.Properties profileProperties
    • Method Detail

      • parseEEVersion

        private EEVersion parseEEVersion​(java.lang.String systemCaps)
      • getCompilerSourceLevelDefault

        public java.lang.String getCompilerSourceLevelDefault()
        Description copied from interface: ExecutionEnvironment
        Returns a reasonable compiler source level default for this execution environment.
        Specified by:
        getCompilerSourceLevelDefault in interface ExecutionEnvironment
        Returns:
        a compiler source level matching the execution environment, or null if unknown.
      • getCompilerTargetLevelDefault

        public java.lang.String getCompilerTargetLevelDefault()
        Description copied from interface: ExecutionEnvironment
        Returns a reasonable compiler target level default for this execution environment.
        Specified by:
        getCompilerTargetLevelDefault in interface ExecutionEnvironment
        Returns:
        a compiler target level matching the execution environment, or null if unknown.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getSystemPackages

        public java.util.Set<java.lang.String> getSystemPackages()
        Description copied from interface: ExecutionEnvironment
        Returns the list of packages (without versions) provided by the execution environment.
        Specified by:
        getSystemPackages in interface ExecutionEnvironment
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • isCompatibleCompilerTargetLevel

        public boolean isCompatibleCompilerTargetLevel​(java.lang.String target)
        Description copied from interface: ExecutionEnvironment
        Returns false 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 interface ExecutionEnvironment
      • toTargetVersion

        private static org.osgi.framework.Version toTargetVersion​(java.lang.String target)