Enum CPU

java.lang.Object
java.lang.Enum<CPU>
io.smallrye.common.cpu.CPU
All Implemented Interfaces:
Serializable, Comparable<CPU>, java.lang.constant.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
    • x86

      public static final CPU x86
    • aarch64

      public static final CPU aarch64
    • arm

      public static final CPU arm
    • riscv

      public static final CPU riscv
    • ppc32

      public static final CPU ppc32
    • ppc32le

      public static final CPU ppc32le
    • ppc

      public static final CPU ppc
    • ppcle

      public static final CPU ppcle
    • wasm32

      public static final CPU wasm32
    • mips

      public static final CPU mips
    • mipsel

      public static final CPU mipsel
    • mips64

      public static final CPU mips64
    • mips64el

      public static final CPU mips64el
  • 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 type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static CPU valueOf(String name)
      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 name
      NullPointerException - 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

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

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

      public boolean isUnknown()
      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