Class OSInformation


  • public class OSInformation
    extends java.lang.Object
    OS specific information, used by the native_capability macro for osgi.native.* bundle properties.
    • Constructor Detail

      • OSInformation

        public OSInformation()
                      throws java.lang.IllegalArgumentException
        Construct OS specific information
        Throws:
        java.lang.IllegalArgumentException
      • OSInformation

        public OSInformation​(java.lang.String sysPropOsName,
                             java.lang.String sysPropOsVersion)
                      throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • getProcessorAliases

        public static java.lang.String[] getProcessorAliases​(java.lang.String osArch)
      • getProcessorAliases

        public static java.lang.String[] getProcessorAliases()
      • getNativeCapabilityClause

        public static java.lang.String getNativeCapabilityClause​(Processor p,
                                                                 java.lang.String[] args)
                                                          throws java.lang.Exception
        Helper for the Processor._native_capability macro
        Parameters:
        args - the arguments of the macro
        Returns:
        a provide capability clause for the native environment
        Throws:
        java.lang.Exception
      • getOperatingSystemAliases

        public static OSInformation.OSNameVersion getOperatingSystemAliases​(java.lang.String sysPropOsName,
                                                                            java.lang.String sysPropOsVersion)
      • getNativeCapability

        public static org.osgi.resource.Capability getNativeCapability​(aQute.service.reporter.Reporter p,
                                                                       java.lang.String... args)
                                                                throws java.lang.Exception
        Return a native capability based on the given specification.
        Parameters:
        p - the processor for the error reporting
        args - a set of assignments. The following keys are supported: osgi.native.processor,osname, osgi.native.osname, osversion,osgi.native.osversion, osgi.native.language, lang
        Returns:
        a native capability
        Throws:
        java.lang.Exception
      • getDefaultNativeCapability

        public static org.osgi.resource.Capability getDefaultNativeCapability()
                                                                       throws java.lang.Exception
        Return the default capability for the current platform
        Returns:
        a default capability for the current platform
        Throws:
        java.lang.Exception