- All Implemented Interfaces:
Serializable
,Comparable<Platform>
,Constable
An enumeration of the platforms that are supported by Attach.
- Since:
- 3.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe android platform provides implementations to access the applicable services available on Android.The desktop platform provides implementations to access the applicable services available on desktop operating systems (such as Windows, Linux, and Mac OS).The ios platform provides implementations to access the applicable services available on iOS. -
Method Summary
Modifier and TypeMethodDescriptionstatic Platform
Returns the current platform that the code is being executed on.final String
getName()
static boolean
Returns whether the current platform is android.static boolean
Returns whether the current platform is desktop.static boolean
isIOS()
Returns whether the current platform is iOS.static Platform
Returns the enum constant of this class with the specified name.static Platform[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DESKTOP
The desktop platform provides implementations to access the applicable services available on desktop operating systems (such as Windows, Linux, and Mac OS). -
ANDROID
The android platform provides implementations to access the applicable services available on Android. -
IOS
The ios platform provides implementations to access the applicable services available on iOS.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getCurrent
Returns the current platform that the code is being executed on. This obviously won't change during the execution of the code. The current platform is obtained by querying the System Propertyjavafx.platform
. If no such property exists, the current platform is set to be theDESKTOP
platform.- Returns:
- The current
Platform
.
-
isDesktop
public static boolean isDesktop()Returns whether the current platform is desktop.- Returns:
- True if the current platform is desktop.
-
isAndroid
public static boolean isAndroid()Returns whether the current platform is android.- Returns:
- True if the current platform is android.
-
isIOS
public static boolean isIOS()Returns whether the current platform is iOS.- Returns:
- True if the current platform is iOS.
-
getName
-