Enum Class Platform

java.lang.Object
java.lang.Enum<Platform>
com.gluonhq.attach.util.Platform
All Implemented Interfaces:
Serializable, Comparable<Platform>, Constable

public enum Platform extends Enum<Platform>
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 Constants
    Enum Constant
    Description
    The 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 Type
    Method
    Description
    static Platform
    Returns the current platform that the code is being executed on.
    final String
     
    static boolean
    Returns whether the current platform is android.
    static boolean
    Returns whether the current platform is desktop.
    static boolean
    Returns whether the current platform is iOS.
    static Platform
    Returns the enum constant of this class with the specified name.
    static Platform[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • DESKTOP

      public static final Platform DESKTOP
      The desktop platform provides implementations to access the applicable services available on desktop operating systems (such as Windows, Linux, and Mac OS).
    • ANDROID

      public static final Platform ANDROID
      The android platform provides implementations to access the applicable services available on Android.
    • IOS

      public static final Platform IOS
      The ios platform provides implementations to access the applicable services available on iOS.
  • Method Details

    • values

      public static Platform[] 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

      public static Platform valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getCurrent

      public static Platform 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 Property javafx.platform. If no such property exists, the current platform is set to be the DESKTOP 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

      public final String getName()