APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.util

public final Enum Architecture

extends Enum<Architecture>
Class Inheritance
Imports
jdk.internal.vm.annotation.ForceInline, java.nio.ByteOrder, java.util.Locale

System architecture enum values. Each architecture, except OTHER, has a matching public static boolean isXXX() method that is true when running on that architecture. The values of `OPENJDK_TARGET_CPU` from the build are mapped to the architecture values.

Field Summary

Modifier and TypeField and Description
public static final Architecture
private final int
public static final Architecture
private final ByteOrder
private static final Architecture
public static final Architecture
public static final Architecture
public static final Architecture
public static final Architecture
public static final Architecture
public static final Architecture
public static final Architecture
public static final Architecture
public static final Architecture
public static final Architecture
public static final Architecture
public static final Architecture

Constructor Summary

AccessConstructor and Description
private
Architecture(int
number of address bits, typically 64 or 32
addrSize
,
ByteOrder
the byte order, big-endian or little-endian
byteOrder
)

Construct an Architecture with number of address bits and byte order.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the number of address bits, typically 64 or 32
addressSize
()

Returns the number of address bits, typically 64 or 32.

public ByteOrder
public static Architecture

Returns:

the current architecture
current
()

Returns the current architecture.

private static Architecture
initArch(String archName)

Returns the Architecture of the built architecture.

public static boolean

Returns:

true if the current architecture is 64-bit
is64bit
()

Returns true if the current architecture is 64-bit.

public static boolean

Returns:

true if the current architecture is AARCH64
isAARCH64
()

Returns true if the current architecture is AARCH64.

public static boolean

Returns:

true if the current architecture is ARM
isARM
()

Returns true if the current architecture is ARM.

public static boolean

Returns:

true if the current architecture is little-endian
isLittleEndian
()

Returns true if the current architecture is little-endian.

public static boolean

Returns:

true if the current architecture is LOONGARCH64
isLOONGARCH64
()

Returns true if the current architecture is LOONGARCH64.

public static boolean

Returns:

true if the current architecture is MIPS64EL
isMIPS64EL
()

Returns true if the current architecture is MIPS64EL.

public static boolean

Returns:

true if the current architecture is MIPSEL
isMIPSEL
()

Returns true if the current architecture is MIPSEL.

public static boolean

Returns:

true if the current architecture is PPC, big-endian
isPPC
()

Returns true if the current architecture is PPC, big-endian.

public static boolean

Returns:

true if the current architecture is PPC64, big-endian
isPPC64
()

Returns true if the current architecture is PPC64, big-endian.

public static boolean

Returns:

true if the current architecture is PPC64, little-endian
isPPC64LE
()

Returns true if the current architecture is PPC64, little-endian.

public static boolean

Returns:

true if the current architecture is RISCV64
isRISCV64
()

Returns true if the current architecture is RISCV64.

public static boolean

Returns:

true if the current architecture is S390
isS390
()

Returns true if the current architecture is S390.

public static boolean

Returns:

true if the current architecture is SPARCV9
isSPARCV9
()

Returns true if the current architecture is SPARCV9.

public static boolean

Returns:

true if the current architecture is X64, Aka amd64
isX64
()

Returns true if the current architecture is X64, Aka amd64.

public static boolean

Returns:

true if the current architecture is X86
isX86
()

Returns true if the current architecture is X86.

public static Architecture

Returns:

the Architecture by name or an alias for the architecture
lookupByName
(String
an Architecture name or alias for the architecture.
archName
)

Returns the Architecture by name or an alias for the architecture.

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

Field Detail

AARCH64back to summary
public static final Architecture AARCH64
addrSizeback to summary
private final int addrSize
ARMback to summary
public static final Architecture ARM
byteOrderback to summary
private final ByteOrder byteOrder
CURRENT_ARCHback to summary
private static final Architecture CURRENT_ARCH
LOONGARCH64back to summary
public static final Architecture LOONGARCH64
MIPS64ELback to summary
public static final Architecture MIPS64EL
MIPSELback to summary
public static final Architecture MIPSEL
OTHERback to summary
public static final Architecture OTHER
PPCback to summary
public static final Architecture PPC
PPC64back to summary
public static final Architecture PPC64
PPC64LEback to summary
public static final Architecture PPC64LE
RISCV64back to summary
public static final Architecture RISCV64
S390back to summary
public static final Architecture S390
SPARCV9back to summary
public static final Architecture SPARCV9
X64back to summary
public static final Architecture X64
X86back to summary
public static final Architecture X86

Constructor Detail

Architectureback to summary
private Architecture(int addrSize, ByteOrder byteOrder)

Construct an Architecture with number of address bits and byte order.

Parameters
addrSize:int

number of address bits, typically 64 or 32

byteOrder:ByteOrder

the byte order, big-endian or little-endian

Method Detail

addressSizeback to summary
public int addressSize()

Returns the number of address bits, typically 64 or 32.

Returns:int

the number of address bits, typically 64 or 32

byteOrderback to summary
public ByteOrder byteOrder()

Returns the byte order, ByteOrder#BIG_ENDIAN or ByteOrder#LITTLE_ENDIAN.

Returns:ByteOrder

the byte order, ByteOrder#BIG_ENDIAN or ByteOrder#LITTLE_ENDIAN

currentback to summary
public static Architecture current()

Returns the current architecture.

Returns:Architecture

the current architecture

initArchback to summary
private static Architecture initArch(String archName)

Returns the Architecture of the built architecture. Build time names are mapped to respective uppercase enum values. Names not recognized are mapped to Architecture.OTHER.

is64bitback to summary
public static boolean is64bit()

Returns true if the current architecture is 64-bit.

Returns:boolean

true if the current architecture is 64-bit

Annotations
@ForceInline
isAARCH64back to summary
public static boolean isAARCH64()

Returns true if the current architecture is AARCH64.

Returns:boolean

true if the current architecture is AARCH64

Annotations
@ForceInline
isARMback to summary
public static boolean isARM()

Returns true if the current architecture is ARM.

Returns:boolean

true if the current architecture is ARM

Annotations
@ForceInline
isLittleEndianback to summary
public static boolean isLittleEndian()

Returns true if the current architecture is little-endian.

Returns:boolean

true if the current architecture is little-endian

Annotations
@ForceInline
isLOONGARCH64back to summary
public static boolean isLOONGARCH64()

Returns true if the current architecture is LOONGARCH64.

Returns:boolean

true if the current architecture is LOONGARCH64

Annotations
@ForceInline
isMIPS64ELback to summary
public static boolean isMIPS64EL()

Returns true if the current architecture is MIPS64EL.

Returns:boolean

true if the current architecture is MIPS64EL

Annotations
@ForceInline
isMIPSELback to summary
public static boolean isMIPSEL()

Returns true if the current architecture is MIPSEL.

Returns:boolean

true if the current architecture is MIPSEL

Annotations
@ForceInline
isPPCback to summary
public static boolean isPPC()

Returns true if the current architecture is PPC, big-endian.

Returns:boolean

true if the current architecture is PPC, big-endian

Annotations
@ForceInline
isPPC64back to summary
public static boolean isPPC64()

Returns true if the current architecture is PPC64, big-endian.

Returns:boolean

true if the current architecture is PPC64, big-endian

Annotations
@ForceInline
isPPC64LEback to summary
public static boolean isPPC64LE()

Returns true if the current architecture is PPC64, little-endian.

Returns:boolean

true if the current architecture is PPC64, little-endian

Annotations
@ForceInline
isRISCV64back to summary
public static boolean isRISCV64()

Returns true if the current architecture is RISCV64.

Returns:boolean

true if the current architecture is RISCV64

Annotations
@ForceInline
isS390back to summary
public static boolean isS390()

Returns true if the current architecture is S390.

Returns:boolean

true if the current architecture is S390

Annotations
@ForceInline
isSPARCV9back to summary
public static boolean isSPARCV9()

Returns true if the current architecture is SPARCV9.

Returns:boolean

true if the current architecture is SPARCV9

Annotations
@ForceInline
isX64back to summary
public static boolean isX64()

Returns true if the current architecture is X64, Aka amd64.

Returns:boolean

true if the current architecture is X64, Aka amd64

Annotations
@ForceInline
isX86back to summary
public static boolean isX86()

Returns true if the current architecture is X86.

Returns:boolean

true if the current architecture is X86

Annotations
@ForceInline
lookupByNameback to summary
public static Architecture lookupByName(String archName)

Returns the Architecture by name or an alias for the architecture. The names are mapped to upper case before mapping to an Architecture.

Parameters
archName:String

an Architecture name or alias for the architecture.

Returns:Architecture

the Architecture by name or an alias for the architecture

Exceptions
IllegalArgumentException:
if the name is not an alias or an Architecture name
valueOfback to summary
public static Architecture valueOf(String name)
valuesback to summary
public static Architecture[] values()