Package io.smallrye.common.cpu
Enum CPU
- All Implemented Interfaces:
Serializable,Comparable<CPU>,java.lang.constant.Constable
Enumerated type for CPU types.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaliases()static CPUNames are compared case-insensitively.forNameOpt(String name) Names are compared case-insensitively.static CPUforNameOrNull(String name) Names are compared case-insensitively.static CPUhost()booleanintintstatic CPUReturns the enum constant of this type with the specified name.static CPU[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
unknown32
An unknown 32-bit little-endian CPU. -
unknown32be
An unknown 32-bit big-endian CPU. -
unknown64
An unknown 64-bit little-endian CPU. -
unknown64be
An unknown 64-bit big-endian CPU. -
x64
-
x86
-
aarch64
-
arm
-
riscv
-
ppc32
-
ppc32le
-
ppc
-
ppcle
-
wasm32
-
mips
-
mipsel
-
mips64
-
mips64el
-
-
Field Details
-
values
All of the possible CPU values, in order.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
pointerSizeBytes
public int pointerSizeBytes()- Returns:
- this CPU's pointer size, in bytes
-
pointerSizeBits
public int pointerSizeBits()- Returns:
- this CPU's pointer size, in bits
-
nativeByteOrder
- Returns:
- this CPU's native byte order
-
aliases
- Returns:
- other names that this CPU is known by
-
isUnknown
public boolean isUnknown()- Returns:
trueif this CPU is unknown
-
forName
Names are compared case-insensitively.- Parameters:
name- aStringfor the CPU name- Returns:
- the CPU for the given name
- Throws:
NoSuchElementException- if no such CPU is found
-
forNameOrNull
Names are compared case-insensitively.- Parameters:
name- aStringfor the CPU name- Returns:
- the CPU for the given name or
nullif it is not found - Throws:
NoSuchElementException
-
forNameOpt
Names are compared case-insensitively.- Parameters:
name- aStringfor the CPU name- Returns:
- the optional CPU for the given name
- Throws:
NoSuchElementException
-
host
- Returns:
- the host CPU type
-