Top Description Fields Constructors Methods
io.smallrye.common.cpu

public final Enum CPU

extends Enum<CPU>
Class Inheritance
Imports
java.nio.ByteOrder, java.util.Comparator, .List, .Map, .NoSuchElementException, .Optional, .Set, java.util.stream.Stream

Enumerated type for CPU types.

Field Summary

Modifier and TypeField and Description
public static final CPU
aarch64

aarch64, also known as arm64.

private final Set<String>
public static final CPU
arm

arm, also known as armv7, etc.

private static final CPU
private static final List<Map.Entry<String, CPU>>
public static final CPU
mips

MIPS 32-bit (big-endian).

public static final CPU
mips64

MIPS 64-bit (big-endian).

public static final CPU
mips64el

MIPS 64-bit (little-endian).

public static final CPU
mipsel

MIPS 32-bit (little-endian).

private final ByteOrder
private final int
public static final CPU
ppc

PowerPC 64-bit (big-endian).

public static final CPU
ppc32

PowerPC 32-bit (big-endian).

public static final CPU
ppc32le

PowerPC 32-bit (little-endian).

public static final CPU
ppcle

PowerPC 64-bit (little-endian).

public static final CPU
riscv

riscv.

private final boolean
public static final CPU
unknown32

An unknown 32-bit little-endian CPU.

public static final CPU
unknown32be

An unknown 32-bit big-endian CPU.

public static final CPU
unknown64

An unknown 64-bit little-endian CPU.

public static final CPU
unknown64be

An unknown 64-bit big-endian CPU.

public static final List<CPU>
values

All of the possible CPU values, in order.

public static final CPU
wasm32

WebAssembly 32-bit.

public static final CPU
x64

Intel/AMD 64-bit x64 architecture.

public static final CPU
x86

Intel 32-bit x86 architecture.

Constructor Summary

AccessConstructor and Description
private
CPU(final int pointerSizeBytes, final ByteOrder nativeByteOrder, final Set<String> aliases, final boolean unknown)

Method Summary

Modifier and TypeMethod and Description
public Set<String>

Returns:

other names that this CPU is known by
aliases
()

Returns other names that this CPU is known by.

private static CPU
check(CPU cpu)

public static CPU

Returns:

the CPU for the given name
forName
(String
a String for the CPU name
name
)

Names are compared case-insensitively.

public static Optional<CPU>

Returns:

the optional CPU for the given name
forNameOpt
(String
a String for the CPU name
name
)

Names are compared case-insensitively.

public static CPU

Returns:

the CPU for the given name or null if it is not found
forNameOrNull
(String
a String for the CPU name
name
)

Names are compared case-insensitively.

public static CPU

Returns:

the host CPU type
host
()

Returns the host CPU type.

public boolean

Returns:

true if this CPU is unknown
isUnknown
()

Returns true if this CPU is unknown.

public ByteOrder

Returns:

this CPU's native byte order
nativeByteOrder
()

Returns this CPU's native byte order.

public int

Returns:

this CPU's pointer size, in bits
pointerSizeBits
()

Returns this CPU's pointer size, in bits.

public int

Returns:

this CPU's pointer size, in bytes
pointerSizeBytes
()

Returns this CPU's pointer size, in bytes.

public static CPU
public static CPU[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

aarch64back to summary
public static final CPU aarch64

aarch64, also known as arm64.

aliasesback to summary
private final Set<String> aliases
armback to summary
public static final CPU arm

arm, also known as armv7, etc.

hostCpuback to summary
private static final CPU hostCpu
indexback to summary
private static final List<Map.Entry<String, CPU>> index
mipsback to summary
public static final CPU mips

MIPS 32-bit (big-endian).

mips64back to summary
public static final CPU mips64

MIPS 64-bit (big-endian).

mips64elback to summary
public static final CPU mips64el

MIPS 64-bit (little-endian).

mipselback to summary
public static final CPU mipsel

MIPS 32-bit (little-endian).

nativeByteOrderback to summary
private final ByteOrder nativeByteOrder
pointerSizeBytesback to summary
private final int pointerSizeBytes
ppcback to summary
public static final CPU ppc

PowerPC 64-bit (big-endian).

ppc32back to summary
public static final CPU ppc32

PowerPC 32-bit (big-endian).

ppc32leback to summary
public static final CPU ppc32le

PowerPC 32-bit (little-endian).

ppcleback to summary
public static final CPU ppcle

PowerPC 64-bit (little-endian).

riscvback to summary
public static final CPU riscv

riscv.

unknownback to summary
private final boolean unknown
unknown32back to summary
public static final CPU unknown32

An unknown 32-bit little-endian CPU.

unknown32beback to summary
public static final CPU unknown32be

An unknown 32-bit big-endian CPU.

unknown64back to summary
public static final CPU unknown64

An unknown 64-bit little-endian CPU.

unknown64beback to summary
public static final CPU unknown64be

An unknown 64-bit big-endian CPU.

valuesback to summary
public static final List<CPU> values

All of the possible CPU values, in order.

wasm32back to summary
public static final CPU wasm32

WebAssembly 32-bit.

x64back to summary
public static final CPU x64

Intel/AMD 64-bit x64 architecture.

x86back to summary
public static final CPU x86

Intel 32-bit x86 architecture.

Constructor Detail

CPUback to summary
private CPU(final int pointerSizeBytes, final ByteOrder nativeByteOrder, final Set<String> aliases, final boolean unknown)

Method Detail

aliasesback to summary
public Set<String> aliases()

Returns other names that this CPU is known by.

Returns:Set<String>

other names that this CPU is known by

checkback to summary
private static CPU check(CPU cpu)
forNameback to summary
public static CPU forName(String name) throws NoSuchElementException

Names are compared case-insensitively.

Parameters
name:String

a String for the CPU name

Returns:CPU

the CPU for the given name

Exceptions
NoSuchElementException:
if no such CPU is found
forNameOptback to summary
public static Optional<CPU> forNameOpt(String name) throws NoSuchElementException

Names are compared case-insensitively.

Parameters
name:String

a String for the CPU name

Returns:Optional<CPU>

the optional CPU for the given name

forNameOrNullback to summary
public static CPU forNameOrNull(String name) throws NoSuchElementException

Names are compared case-insensitively.

Parameters
name:String

a String for the CPU name

Returns:CPU

the CPU for the given name or null if it is not found

hostback to summary
public static CPU host()

Returns the host CPU type.

Returns:CPU

the host CPU type

isUnknownback to summary
public boolean isUnknown()

Returns true if this CPU is unknown.

Returns:boolean

true if this CPU is unknown

nativeByteOrderback to summary
public ByteOrder nativeByteOrder()

Returns this CPU's native byte order.

Returns:ByteOrder

this CPU's native byte order

pointerSizeBitsback to summary
public int pointerSizeBits()

Returns this CPU's pointer size, in bits.

Returns:int

this CPU's pointer size, in bits

pointerSizeBytesback to summary
public int pointerSizeBytes()

Returns this CPU's pointer size, in bytes.

Returns:int

this CPU's pointer size, in bytes

valueOfback to summary
public static CPU valueOf(String name)
valuesback to summary
public static CPU[] values()