A platform group (e.g., an architecture or OS) is an interface extending Platform. A leaf
platform, e.g., a supported architecture-OS-combination, is a class that implements all the
groups that it belongs to. A leaf platform class must be non-abstract and must have a no-argument
constructor. It is good practice to make leaf platform classes final (to prevent
accidental subclassing) and to avoid state (i.e., no fields).
The annotation Platforms restricts a type, method, or field to certain platform groups or
leaf platforms.
This system makes the set of platform groups and leaf platforms extensible. Some standard platforms are defined as inner classes.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | Platform.
Supported architecture: ARMv8 64-bit. |
| public static interface | Platform.
Supported architecture: x86 64-bit. |
| public static interface | Platform.
Supported operating system: Android. |
| public static class | Platform.
Supported leaf platform: Android on AArch64 64-bit. |
| public static interface | Platform.
Basis for all Apple operating systems (MacOS and iOS). |
| public static interface | Platform.
Basis for all Apple operating systems on AMD64 (MACOS_AMD64 & IOS_AMD64). |
| public static interface | Platform.
Basis for all Apple operating systems on AMD64 (MACOS_AMD64 & IOS_AMD64). |
| public static class | Platform.
Marker for elements (types, methods, or fields) that are only visible during native image generation and cannot be used at run time, regardless of the actual platform. |
| public static interface | Platform.
Supported operating system: iOS. |
| public static class | Platform.
Supported leaf platform: iOS on AArch 64-bit. |
| public static class | Platform.
Supported leaf platform: iOS on x86 64-bit. |
| public static interface | Platform.
Supported operating system: Linux. |
| public static class | Platform.
Supported leaf platform: Linux on AArch64 64-bit. |
| public static interface | Platform.
Basis for all Linux operating systems on AARCH64 (LINUX_AARCH64 & ANDROID_AARCH64). |
| public static class | Platform.
Supported leaf platform: Linux on x86 64-bit. |
| public static interface | Platform.
Basis for all Linux operating systems on AMD64 (LINUX_AMD64). |
| public static class | Platform.
Supported leaf platform: Linux on RISC-V 64-bit. |
| public static interface | Platform.
Supported operating system: MacOS. |
| public static class | Platform.
Supported leaf platform: MacOS on AArch 64-bit. |
| public static class | Platform.
Supported leaf platform: MacOS on x86 64-bit. |
| public static interface | Platform.
Supported architecture: RISC-V 64-bit. |
| public static interface | Platform.
Supported operating system: Windows. |
| public static class | Platform.
Supported leaf platform: Windows on AArch 64-bit. |
| public static class | Platform.
Supported leaf platform: Windows on x86 64-bit. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | PLATFORM_PROPERTY_NAME
The system property name that specifies the fully qualified name of the |
| Modifier and Type | Method and Description |
|---|---|
| public default String | |
| public default String | |
| public static boolean | includedIn(Class<? extends Platform> platformGroup)
Returns true if the current platform (the platform that the native image is built for) is included in the provided platform group. |
| PLATFORM_PROPERTY_NAME | back to summary |
|---|---|
| public static final String PLATFORM_PROPERTY_NAME The system property name that specifies the fully qualified name of the
| |
| getArchitecture | back to summary |
|---|---|
| public default String getArchitecture() Returns the string representing Platform's architecture name. This value should be the same as desired os.arch system property. This method should be implemented either in final class or as default method in respective architecture interface.
| |
| getOS | back to summary |
|---|---|
| public default String getOS() Returns the string representing Platform's OS name. This method should be implemented either in a final class or as default method in respective OS interface.
| |
| includedIn | back to summary |
|---|---|
| public static boolean includedIn(Class<? extends Platform> platformGroup) Returns true if the current platform (the platform that the native image is built for) is included in the provided platform group. The platformGroup must be a compile-time constant, so that the call to this method can be replaced with the constant boolean result.
| |
| Modifier and Type | Method and Description |
|---|---|
| public default String | getArchitecture()
Overrides default org. Returns string representing AARCH64 architecture. |
| getArchitecture | back to summary |
|---|---|
| public default String getArchitecture() Overrides default org. Returns string representing AARCH64 architecture.
| |
| Modifier and Type | Method and Description |
|---|---|
| public default String | getArchitecture()
Overrides default org. Returns string representing AMD64 architecture. |
| getArchitecture | back to summary |
|---|---|
| public default String getArchitecture() Overrides default org. Returns string representing AMD64 architecture.
| |
| Modifier and Type | Method and Description |
|---|---|
| public default String | getOS()
Overrides default org. Returns string representing ANDROID OS. |
| getOS | back to summary |
|---|---|
| public default String getOS() Overrides default org. Returns string representing ANDROID OS.
| |
| Access | Constructor and Description |
|---|---|
| public |
| ANDROID_AARCH64 | back to summary |
|---|---|
| public ANDROID_AARCH64() Instantiates a marker instance of this platform.
| |
| Access | Constructor and Description |
|---|---|
| private |
| HOSTED_ONLY | back to summary |
|---|---|
| private HOSTED_ONLY() | |
| Modifier and Type | Method and Description |
|---|---|
| public default String | getOS()
Overrides default org. Returns string representing iOS OS. |
| getOS | back to summary |
|---|---|
| public default String getOS() Overrides default org. Returns string representing iOS OS.
| |
| Access | Constructor and Description |
|---|---|
| public |
| IOS_AARCH64 | back to summary |
|---|---|
| public IOS_AARCH64() Instantiates a marker instance of this platform.
| |
| Access | Constructor and Description |
|---|---|
| public |
| IOS_AMD64 | back to summary |
|---|---|
| public IOS_AMD64() Instantiates a marker instance of this platform.
| |
| Modifier and Type | Method and Description |
|---|---|
| public default String | getOS()
Overrides default org. Returns string representing LINUX OS. |
| getOS | back to summary |
|---|---|
| public default String getOS() Overrides default org. Returns string representing LINUX OS.
| |
| Access | Constructor and Description |
|---|---|
| public |
| LINUX_AARCH64 | back to summary |
|---|---|
| public LINUX_AARCH64() Instantiates a marker instance of this platform.
| |
| Access | Constructor and Description |
|---|---|
| public |
| LINUX_AMD64 | back to summary |
|---|---|
| public LINUX_AMD64() Instantiates a marker instance of this platform.
| |
| Access | Constructor and Description |
|---|---|
| public |
| LINUX_RISCV64 | back to summary |
|---|---|
| public LINUX_RISCV64() Instantiates a marker instance of this platform.
| |
| Modifier and Type | Method and Description |
|---|---|
| public default String | getOS()
Overrides default org. Returns string representing MACOS OS. |
| getOS | back to summary |
|---|---|
| public default String getOS() Overrides default org. Returns string representing MACOS OS.
| |
| Access | Constructor and Description |
|---|---|
| public |
| MACOS_AARCH64 | back to summary |
|---|---|
| public MACOS_AARCH64() Instantiates a marker instance of this platform.
| |
| Access | Constructor and Description |
|---|---|
| public |
| MACOS_AMD64 | back to summary |
|---|---|
| public MACOS_AMD64() Instantiates a marker instance of this platform.
| |
| Modifier and Type | Method and Description |
|---|---|
| public default String | getArchitecture()
Overrides default org. Returns string representing RISCV64 architecture. |
| getArchitecture | back to summary |
|---|---|
| public default String getArchitecture() Overrides default org. Returns string representing RISCV64 architecture.
| |
| Modifier and Type | Method and Description |
|---|---|
| public default String | getOS()
Overrides default org. Returns string representing WINDOWS OS. |
| getOS | back to summary |
|---|---|
| public default String getOS() Overrides default org. Returns string representing WINDOWS OS.
| |
| Access | Constructor and Description |
|---|---|
| public |
| WINDOWS_AARCH64 | back to summary |
|---|---|
| public WINDOWS_AARCH64() Instantiates a marker instance of this platform.
| |
| Access | Constructor and Description |
|---|---|
| public |
| WINDOWS_AMD64 | back to summary |
|---|---|
| public WINDOWS_AMD64() Instantiates a marker instance of this platform.
| |