Enum Class SystemArchitecture
- All Implemented Interfaces:
Serializable,Comparable<SystemArchitecture>,Constable
Represents the different types of system architectures and provides utility methods
for working with architecture-related data.
Each enumeration value is associated with a list of aliases that can be used to identify the architecture. This allows flexible mapping from architecture strings to the corresponding enumeration value.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents the AARCH32 system architecture, also known as ARM 32-bit architecture.Represents the 64-bit ARM architecture, commonly known as `aarch64` or `arm64`.Represents the x86_64 (64-bit) system architecture with common aliases.Represents the 32-bit x86 system architecture. -
Method Summary
Modifier and TypeMethodDescriptionaliases()Retrieves the list of alias names associated with the system architecture.static SystemArchitecturecurrent()Returns the current system architecture based on the `os.arch` system property.static SystemArchitectureParses the input string representing an operating system architecture and returns the correspondingSystemArchitectureenumeration value.toString()Returns the lowercase string representation of the enumeration constant's name.static SystemArchitectureReturns the enum constant of this class with the specified name.static SystemArchitecture[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AARCH32
Represents the AARCH32 system architecture, also known as ARM 32-bit architecture. -
AARCH64
Represents the 64-bit ARM architecture, commonly known as `aarch64` or `arm64`. -
X64
Represents the x86_64 (64-bit) system architecture with common aliases. -
X86_32
Represents the 32-bit x86 system architecture.
-
-
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
-
aliases
Retrieves the list of alias names associated with the system architecture.- Returns:
- a list of alias strings used to identify this system architecture
-
toString
Returns the lowercase string representation of the enumeration constant's name.- Overrides:
toStringin classEnum<SystemArchitecture>- Returns:
- the name of the enumeration constant in lowercase using the root locale.
-
current
Returns the current system architecture based on the `os.arch` system property.- Returns:
- the enum value referring to the current system architecture
-
parse
Parses the input string representing an operating system architecture and returns the correspondingSystemArchitectureenumeration value.The input string is normalized by converting it to lowercase and trimming any leading or trailing whitespace. It is then compared against known aliases for each architecture. If a match is found, the corresponding
SystemArchitecturevalue is returned. Otherwise, anIllegalStateExceptionis thrown.- Parameters:
osArch- the operating system architecture as a string- Returns:
- the corresponding
SystemArchitectureenumeration value - Throws:
IllegalStateException- if the input string does not match any known architecture aliases
-