Enum Class OSType

java.lang.Object
java.lang.Enum<OSType>
com.pnfsoftware.jeb.util.base.OSType
All Implemented Interfaces:
Serializable, Comparable<OSType>, Constable

public enum OSType extends Enum<OSType>
Determine the current operating system. Limited to Linux, macOS, and Windows, running on x86, x64, or aarch64 processors.
  • Enum Constant Details

    • UNKNOWN

      public static final OSType UNKNOWN
    • LINUX32

      public static final OSType LINUX32
    • OSX32

      public static final OSType OSX32
    • WIN32

      public static final OSType WIN32
    • LINUX64

      public static final OSType LINUX64
    • OSX64

      public static final OSType OSX64
    • WIN64

      public static final OSType WIN64
    • LINUX_ARM64

      public static final OSType LINUX_ARM64
    • OSX_ARM64

      public static final OSType OSX_ARM64
    • WIN_ARM64

      public static final OSType WIN_ARM64
  • Method Details

    • values

      public static OSType[] 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 OSType 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
    • getFolderName

      public String getFolderName()
      Returns:
      the folder name used by JEB to store OS-specific files for this operating system
    • determine

      public static OSType determine()
      Determine the operating system type for the current JVM.
      Returns:
      current operating system type, or UNKNOWN if unsupported
    • isKnown

      public boolean isKnown()
      Returns:
      true if this value represents a recognized operating system
    • isWindows

      public boolean isWindows()
      Returns:
      true for Windows variants
    • isMac

      public boolean isMac()
      Returns:
      true for macOS variants
    • isLinux

      public boolean isLinux()
      Returns:
      true for Linux variants
    • is32bit

      public boolean is32bit()
      Returns:
      true for 32-bit variants
    • is64bit

      public boolean is64bit()
      Returns:
      true for 64-bit variants, including ARM64