Package aQute.bnd.osgi
Class OSInformation
- java.lang.Object
-
- aQute.bnd.osgi.OSInformation
-
public class OSInformation extends java.lang.Object
OS specific information, used by the native_capability macro for osgi.native.* bundle properties.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OSInformation.OSNameVersion
-
Constructor Summary
Constructors Constructor Description OSInformation()
Construct OS specific informationOSInformation(java.lang.String sysPropOsName, java.lang.String sysPropOsVersion)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.osgi.resource.Capability
getDefaultNativeCapability()
Return the default capability for the current platformstatic org.osgi.resource.Capability
getNativeCapability(aQute.service.reporter.Reporter p, java.lang.String... args)
Return a native capability based on the given specification.static java.lang.String
getNativeCapabilityClause(Processor p, java.lang.String[] args)
Helper for the Processor._native_capability macrostatic OSInformation.OSNameVersion
getOperatingSystemAliases(java.lang.String sysPropOsName, java.lang.String sysPropOsVersion)
static java.lang.String[]
getProcessorAliases()
static java.lang.String[]
getProcessorAliases(java.lang.String osArch)
-
-
-
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 reportingargs
- 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
-
-