- All Implemented Interfaces:
Serializable,Comparable<Arch>,java.lang.constant.Constable
Enumerated type for listing the processor architectures of the
platform on which the JVM is running
-
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 TypeMethodDescriptionGets the current platform architectureReturns the current architecture where the JVM is runninggetRunningEmulateArch(@Nullable Arch emulate) Emulates some desired architecture or returns the architecture that is currently running.toString()Object string representationstatic ArchReturns the enum constant of this class with the specified name.static Arch[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ARM
ARM architecture (The new Apple devices runs in this architecture) -
X64
64-bit architecture -
X86
32-bit architecture -
UNKNOWN
Unknown architecture. Used only to represent an error
-
-
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
-
getRawArch
Gets the current platform architecture- Returns:
- the current platform architecture
-
getRunningArch
Returns the current architecture where the JVM is running- Returns:
- Returns the architecture where the JVM runs or UNKNOWN if the architecture is not listed
-
getRunningEmulateArch
Emulates some desired architecture or returns the architecture that is currently running. This is only used for experimentation or debugging purposes.- Parameters:
emulate- target arch emulation- Returns:
- the running arch or emulated arch
-
toString
Object string representation
-