Enum Class Platform

java.lang.Object
java.lang.Enum<Platform>
dev.prozilla.pine.common.system.Platform
All Implemented Interfaces:
Serializable, Comparable<Platform>, Constable

public enum Platform extends Enum<Platform>
Represents the platforms supported by Pine.

This is a wrapper for Platform.

  • Enum Constant Details

    • FREEBSD

      public static final Platform FREEBSD
    • LINUX

      public static final Platform LINUX
    • MACOS

      public static final Platform MACOS
    • WINDOWS

      public static final Platform WINDOWS
  • 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
    • getIdentifier

      public String getIdentifier()
      Returns the identifier of this platform
      Returns:
      The identifier of this platform
    • getName

      public String getName()
      Returns the name of this platform
      Returns:
      The name of this platform
    • isCurrent

      public boolean isCurrent()
      Checks if this is the current platform.
      Returns:
      true if this is the current platform.
    • getUserPath

      public abstract String getUserPath(String userHome, String separator)
    • getPersistentDataPath

      public static String getPersistentDataPath(String subDirectory)
    • getPersistentDataPath

      public static String getPersistentDataPath(String subDirectory, boolean createDirectories)
    • get

      public static Platform get()
      Returns the platform Pine is running on.
      Returns:
      The current platform, or null if the platform is not supported.
    • getArchitecture

      public static Platform.Architecture getArchitecture()
      Returns the architecture Pine is running on.
      Returns:
      The current architecture, or null if the architecture is not supported.
    • getDescriptor

      public static String getDescriptor()
      Returns the descriptor of the platform and architecture in the format platform/architecture.
      Returns:
      The descriptor of the platform and architecture.
    • isUnix

      public static boolean isUnix()
      Checks if the current platform is Unix-based.
      Returns:
      true if the current platform is Unix-based.
    • isSupported

      public static boolean isSupported()
      Checks if the current platform is supported by Pine.
      Returns:
      true if the current platform is supported by Pine.
    • mapLibraryNameBundled

      public static String mapLibraryNameBundled(String name)
    • parse

      public static Platform parse(String input)
    • parseArchitecture

      public static Platform.Architecture parseArchitecture(String input)