Package com.pnfsoftware.jeb.util.base
Enum Class OSType
- All Implemented Interfaces:
Serializable,Comparable<OSType>,Constable
Determine the current operating system. Limited to Linux, macOS, and Windows, running on x86,
x64, or aarch64 processors.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic OSTypeDetermine the operating system type for the current JVM.booleanis32bit()booleanis64bit()booleanisKnown()booleanisLinux()booleanisMac()booleanstatic OSTypeReturns the enum constant of this class with the specified name.static OSType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
-
LINUX32
-
OSX32
-
WIN32
-
LINUX64
-
OSX64
-
WIN64
-
LINUX_ARM64
-
OSX_ARM64
-
WIN_ARM64
-
-
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
-
getFolderName
- Returns:
- the folder name used by JEB to store OS-specific files for this operating system
-
determine
Determine the operating system type for the current JVM.- Returns:
- current operating system type, or
UNKNOWNif 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
-