java.lang.Object
java.lang.Enum<Arch>
ushiosan.jvm_utilities.system.Arch
All Implemented Interfaces:
Serializable, Comparable<Arch>, java.lang.constant.Constable

public enum Arch extends Enum<Arch>
Enumerated type for listing the processor architectures of the platform on which the JVM is running
  • Enum Constant Details

    • ARM

      public static final Arch ARM
      ARM architecture (The new Apple devices runs in this architecture)
    • X64

      public static final Arch X64
      64-bit architecture
    • X86

      public static final Arch X86
      32-bit architecture
    • UNKNOWN

      public static final Arch UNKNOWN
      Unknown architecture. Used only to represent an error
  • Method Details

    • values

      public static Arch[] 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 Arch 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
    • getRawArch

      @NotNull public static @NotNull String getRawArch()
      Gets the current platform architecture
      Returns:
      the current platform architecture
    • getRunningArch

      @NotNull public static @NotNull Arch getRunningArch()
      Returns the current architecture where the JVM is running
      Returns:
      Returns the architecture where the JVM runs or UNKNOWN if the architecture is not listed
    • getRunningEmulateArch

      @NotNull public static @NotNull Arch getRunningEmulateArch(@Nullable @Nullable Arch emulate)
      Emulates some desired architecture or returns the architecture that is currently running. This is only used for experimentation or debugging purposes.
      Parameters:
      emulate - target arch emulation
      Returns:
      the running arch or emulated arch
    • toString

      @NotNull public @NotNull String toString()
      Object string representation
      Overrides:
      toString in class Enum<Arch>
      Returns:
      object string representation