Package oshi

Enum PlatformEnum

All Implemented Interfaces:
Serializable, Comparable<PlatformEnum>

public enum PlatformEnum extends Enum<PlatformEnum>
An enumeration of supported operating systems. The order of declaration matches the osType constants in the JNA Platform class.
  • Enum Constant Details

    • MACOS

      public static final PlatformEnum MACOS
      macOS
    • LINUX

      public static final PlatformEnum LINUX
      A flavor of Linux
    • WINDOWS

      public static final PlatformEnum WINDOWS
      Microsoft Windows
    • SOLARIS

      public static final PlatformEnum SOLARIS
      Solaris (SunOS)
    • FREEBSD

      public static final PlatformEnum FREEBSD
      FreeBSD
    • OPENBSD

      public static final PlatformEnum OPENBSD
      OpenBSD
    • WINDOWSCE

      public static final PlatformEnum WINDOWSCE
      Windows Embedded Compact
    • AIX

      public static final PlatformEnum AIX
      IBM AIX
    • ANDROID

      public static final PlatformEnum ANDROID
      Android
    • GNU

      public static final PlatformEnum GNU
      GNU operating system
    • KFREEBSD

      public static final PlatformEnum KFREEBSD
      Debian GNU/kFreeBSD
    • NETBSD

      public static final PlatformEnum NETBSD
      NetBSD
    • UNKNOWN

      public static final PlatformEnum UNKNOWN
      An unspecified system
  • Method Details

    • values

      public static PlatformEnum[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PlatformEnum valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      public String getName()
      Gets the friendly name of the platform
      Returns:
      the friendly name of the platform
    • getName

      public static String getName(int osType)
      Gets the friendly name of the specified JNA Platform type
      Parameters:
      osType - The constant returned from JNA's Platform.getOSType() method.
      Returns:
      the friendly name of the specified JNA Platform type
    • getValue

      public static PlatformEnum getValue(int osType)
      Gets the value corresponding to the specified JNA Platform type
      Parameters:
      osType - The constant returned from JNA's Platform.getOSType() method.
      Returns:
      the value corresponding to the specified JNA Platform type