Package io.github.jwharm.javagi.interop
Class Platform
java.lang.Object
io.github.jwharm.javagi.interop.Platform
The Platform class provides utility functions to retrieve the runtime
platform and and check if a function is supported on the runtime platform.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkSupportedPlatform
(String... supportedPlatforms) Check if the runtime platform is in the list of provided platforms; if not, throws UnsupportedPlatformException.static String
Determine the runtime platform
-
Constructor Details
-
Platform
public Platform()
-
-
Method Details
-
getRuntimePlatform
Determine the runtime platform- Returns:
- the runtime platform: "windows", "linux" or "macos"
-
checkSupportedPlatform
public static void checkSupportedPlatform(String... supportedPlatforms) throws UnsupportedPlatformException Check if the runtime platform is in the list of provided platforms; if not, throws UnsupportedPlatformException.- Parameters:
supportedPlatforms
- the platforms on which the api call is supported- Throws:
UnsupportedPlatformException
- when the runtime platform does not support this api call
-