类 PlatformDetector
java.lang.Object
io.github.amsonix.molt.internal.reschiper.android.PlatformDetector
Utility class for detecting the current platform/operating system.
-
字段概要
字段修饰符和类型字段说明static final intConstant representing the macOS (Darwin) platform.static final intConstant representing the Linux platform.static final intConstant representing an unknown platform.static final intConstant representing the Windows platform. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static intDetects and returns the current platform/operating system.
-
字段详细资料
-
PLATFORM_UNKNOWN
public static final int PLATFORM_UNKNOWNConstant representing an unknown platform.- 另请参阅:
-
PLATFORM_LINUX
public static final int PLATFORM_LINUXConstant representing the Linux platform.- 另请参阅:
-
PLATFORM_WINDOWS
public static final int PLATFORM_WINDOWSConstant representing the Windows platform.- 另请参阅:
-
PLATFORM_DARWIN
public static final int PLATFORM_DARWINConstant representing the macOS (Darwin) platform.- 另请参阅:
-
-
构造器详细资料
-
PlatformDetector
public PlatformDetector()
-
-
方法详细资料
-
currentPlatform
public static int currentPlatform()Detects and returns the current platform/operating system.- 返回:
- An integer representing the current platform:
-
PLATFORM_UNKNOWNif the platform cannot be determined. -PLATFORM_LINUXif the platform is Linux. -PLATFORM_WINDOWSif the platform is Windows. -PLATFORM_DARWINif the platform is macOS (Darwin).
-