Enum Class CPU

java.lang.Object
java.lang.Enum<CPU>
io.smallrye.common.cpu.CPU
All Implemented Interfaces:
Serializable, Comparable<CPU>, Constable

public enum CPU extends Enum<CPU>
Enumerated type for CPU types.
  • Enum Constant Details

    • unknown32

      public static final CPU unknown32
      An unknown 32-bit little-endian CPU.
    • unknown32be

      public static final CPU unknown32be
      An unknown 32-bit big-endian CPU.
    • unknown64

      public static final CPU unknown64
      An unknown 64-bit little-endian CPU.
    • unknown64be

      public static final CPU unknown64be
      An unknown 64-bit big-endian CPU.
    • x64

      public static final CPU x64
      Intel/AMD 64-bit x64 architecture.
    • x86

      public static final CPU x86
      Intel 32-bit x86 architecture.
    • aarch64

      public static final CPU aarch64
      aarch64, also known as arm64.
    • arm

      public static final CPU arm
      arm, also known as armv7, etc.
    • riscv

      public static final CPU riscv
      riscv.
    • ppc32

      public static final CPU ppc32
      PowerPC 32-bit (big-endian).
    • ppc32le

      public static final CPU ppc32le
      PowerPC 32-bit (little-endian).
    • ppc

      public static final CPU ppc
      PowerPC 64-bit (big-endian).
    • ppcle

      public static final CPU ppcle
      PowerPC 64-bit (little-endian).
    • wasm32

      public static final CPU wasm32
      WebAssembly 32-bit.
    • mips

      public static final CPU mips
      MIPS 32-bit (big-endian).
    • mipsel

      public static final CPU mipsel
      MIPS 32-bit (little-endian).
    • mips64

      public static final CPU mips64
      MIPS 64-bit (big-endian).
    • mips64el

      public static final CPU mips64el
      MIPS 64-bit (little-endian).
  • Field Details

    • values

      public static final List<CPU> values
      All of the possible CPU values, in order.
  • Method Details

    • values

      public static CPU[] 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

      public static CPU valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • pointerSizeBytes

      public int pointerSizeBytes()
      Returns this CPU's pointer size, in bytes.
      Returns:
      this CPU's pointer size, in bytes
    • pointerSizeBits

      public int pointerSizeBits()
      Returns this CPU's pointer size, in bits.
      Returns:
      this CPU's pointer size, in bits
    • nativeByteOrder

      public ByteOrder nativeByteOrder()
      Returns this CPU's native byte order.
      Returns:
      this CPU's native byte order
    • aliases

      public Set<String> aliases()
      Returns other names that this CPU is known by.
      Returns:
      other names that this CPU is known by
    • isUnknown

      public boolean isUnknown()
      Returns true if this CPU is unknown.
      Returns:
      true if this CPU is unknown
    • forName

      public static CPU forName(String name) throws NoSuchElementException
      Names are compared case-insensitively.
      Parameters:
      name - a String for the CPU name
      Returns:
      the CPU for the given name
      Throws:
      NoSuchElementException - if no such CPU is found
    • forNameOrNull

      public static CPU forNameOrNull(String name) throws NoSuchElementException
      Names are compared case-insensitively.
      Parameters:
      name - a String for the CPU name
      Returns:
      the CPU for the given name or null if it is not found
      Throws:
      NoSuchElementException
    • forNameOpt

      public static Optional<CPU> forNameOpt(String name) throws NoSuchElementException
      Names are compared case-insensitively.
      Parameters:
      name - a String for the CPU name
      Returns:
      the optional CPU for the given name
      Throws:
      NoSuchElementException
    • host

      public static CPU host()
      Returns the host CPU type.
      Returns:
      the host CPU type