# Enum Class Opcode.Kind

java.lang.Object
java.lang.Enum<Opcode.Kind>
java.lang.classfile.Opcode.Kind

All Implemented Interfaces:
  `Serializable, Comparable<Opcode.Kind>, Constable`

Enclosing class:
  `Opcode`

public static enum Opcode.Kind extends Enum<Opcode.Kind>
Kinds of opcodes. Each kind of opcode has its own modeling interface for its instructions.

Since:
  24

- ## Nested Class Summary

  ### Nested classes/interfaces declared in class Enum

  `Enum.EnumDesc<E>`
  Modifier and Type
  Class
  Description
  `static final class`
  `Enum.EnumDesc<E extends Enum<E>>`
  A nominal descriptor for an `enum` constant.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `ARRAY_LOAD`
  Load from array.
  `ARRAY_STORE`
  Store into array.
  `BRANCH`
  Branch.
  `CONSTANT`
  Constants.
  `CONVERT`
  Type conversions.
  `DISCONTINUED_JSR`
  Discontinued jump subroutine.
  `DISCONTINUED_RET`
  Discontinued return from subroutine.
  `FIELD_ACCESS`
  Access field.
  `INCREMENT`
  Increment local variable.
  `INVOKE`
  Invoke method or constructor.
  `INVOKE_DYNAMIC`
  Invoke a dynamically-computed call site.
  `LOAD`
  Load from local variable.
  `LOOKUP_SWITCH`
  Access jump table by key match and jump.
  `MONITOR`
  Monitor.
  `NEW_MULTI_ARRAY`
  Create new multidimensional array.
  `NEW_OBJECT`
  Create new object.
  `NEW_PRIMITIVE_ARRAY`
  Create new array.
  `NEW_REF_ARRAY`
  Create new `reference` array.
  `NOP`
  Do nothing.
  `OPERATOR`
  Operators.
  `RETURN`
  Return from method.
  `STACK`
  Stack operations.
  `STORE`
  Store into local variable.
  `TABLE_SWITCH`
  Access jump table by index and jump.
  `THROW_EXCEPTION`
  Throw exception or error.
  `TYPE_CHECK`
  Check whether object is of given type.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Opcode.Kind`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static Opcode.Kind[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods declared in class Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`
  Modifier and Type
  Method
  Description
  `protected final Object`
  `clone()`
  Throws CloneNotSupportedException.
  `final int`
  `compareTo(Opcode.Kind o)`
  Compares this enum with the specified object for order.
  `final Optional<Enum.EnumDesc<Opcode.Kind>>`
  `describeConstable()`
  Returns an enum descriptor `EnumDesc` for this instance, if one can be constructed, or an empty `Optional` if one cannot be.
  `final boolean`
  `equals(Object other)`
  Returns true if the specified object is equal to this enum constant.
  `protected final void`
  `finalize()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Finalization has been deprecated for removal.
  `final Class<Opcode.Kind>`
  `getDeclaringClass()`
  Returns the Class object corresponding to this enum constant's enum type.
  `final int`
  `hashCode()`
  Returns a hash code for this enum constant.
  `final String`
  `name()`
  Returns the name of this enum constant, exactly as declared in its enum declaration.
  `final int`
  `ordinal()`
  Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
  `String`
  `toString()`
  Returns the name of this enum constant, as contained in the declaration.
  `static <T extends Enum<T>>
  T`
  `valueOf(Class<T> enumClass, String name)`
  Returns the enum constant of the specified enum class with the specified name.

  ### Methods declared in class Object

  `getClass, notify, notifyAll, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `final Class<?>`
  `getClass()`
  Returns the runtime class of this `Object`.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `final void`
  `wait()`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
  `final void`
  `wait(long timeoutMillis)`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
  `final void`
  `wait(long timeoutMillis, int nanos)`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

- ## Enum Constant Details

  - ### LOAD

    public static final Opcode.Kind LOAD
    Load from local variable.
    See Also:
      - `LoadInstruction`
      - `Opcode.ILOAD`
      - `Opcode.LLOAD`
      - `Opcode.FLOAD`
      - `Opcode.DLOAD`
      - `Opcode.ALOAD`
      - `Opcode.ILOAD_0`
      - `Opcode.ILOAD_1`
      - `Opcode.ILOAD_2`
      - `Opcode.ILOAD_3`
      - `Opcode.LLOAD_0`
      - `Opcode.LLOAD_1`
      - `Opcode.LLOAD_2`
      - `Opcode.LLOAD_3`
      - `Opcode.FLOAD_0`
      - `Opcode.FLOAD_1`
      - `Opcode.FLOAD_2`
      - `Opcode.FLOAD_3`
      - `Opcode.DLOAD_0`
      - `Opcode.DLOAD_1`
      - `Opcode.DLOAD_2`
      - `Opcode.DLOAD_3`
      - `Opcode.ALOAD_0`
      - `Opcode.ALOAD_1`
      - `Opcode.ALOAD_2`
      - `Opcode.ALOAD_3`
      - `Opcode.ILOAD_W`
      - `Opcode.LLOAD_W`
      - `Opcode.FLOAD_W`
      - `Opcode.DLOAD_W`
      - `Opcode.ALOAD_W`

  - ### STORE

    public static final Opcode.Kind STORE
    Store into local variable.
    See Also:
      - `StoreInstruction`
      - `Opcode.ISTORE`
      - `Opcode.LSTORE`
      - `Opcode.FSTORE`
      - `Opcode.DSTORE`
      - `Opcode.ASTORE`
      - `Opcode.ISTORE_0`
      - `Opcode.ISTORE_1`
      - `Opcode.ISTORE_2`
      - `Opcode.ISTORE_3`
      - `Opcode.LSTORE_0`
      - `Opcode.LSTORE_1`
      - `Opcode.LSTORE_2`
      - `Opcode.LSTORE_3`
      - `Opcode.FSTORE_0`
      - `Opcode.FSTORE_1`
      - `Opcode.FSTORE_2`
      - `Opcode.FSTORE_3`
      - `Opcode.DSTORE_0`
      - `Opcode.DSTORE_1`
      - `Opcode.DSTORE_2`
      - `Opcode.DSTORE_3`
      - `Opcode.ASTORE_0`
      - `Opcode.ASTORE_1`
      - `Opcode.ASTORE_2`
      - `Opcode.ASTORE_3`
      - `Opcode.ISTORE_W`
      - `Opcode.LSTORE_W`
      - `Opcode.FSTORE_W`
      - `Opcode.DSTORE_W`
      - `Opcode.ASTORE_W`

  - ### INCREMENT

    public static final Opcode.Kind INCREMENT
    Increment local variable.
    See Also:
      - `IncrementInstruction`
      - `Opcode.IINC`
      - `Opcode.IINC_W`

  - ### BRANCH

    public static final Opcode.Kind BRANCH
    Branch.
    See Also:
      - `BranchInstruction`
      - `Opcode.IFEQ`
      - `Opcode.IFNE`
      - `Opcode.IFLT`
      - `Opcode.IFGE`
      - `Opcode.IFGT`
      - `Opcode.IFLE`
      - `Opcode.IF_ICMPEQ`
      - `Opcode.IF_ICMPNE`
      - `Opcode.IF_ICMPLT`
      - `Opcode.IF_ICMPGE`
      - `Opcode.IF_ICMPGT`
      - `Opcode.IF_ICMPLE`
      - `Opcode.IF_ACMPEQ`
      - `Opcode.IF_ACMPNE`
      - `Opcode.GOTO`
      - `Opcode.IFNULL`
      - `Opcode.IFNONNULL`
      - `Opcode.GOTO_W`

  - ### LOOKUP_SWITCH

    public static final Opcode.Kind LOOKUP_SWITCH
    Access jump table by key match and jump.
    See Also:
      - `LookupSwitchInstruction`
      - `Opcode.LOOKUPSWITCH`

  - ### TABLE_SWITCH

    public static final Opcode.Kind TABLE_SWITCH
    Access jump table by index and jump.
    See Also:
      - `TableSwitchInstruction`
      - `Opcode.TABLESWITCH`

  - ### RETURN

    public static final Opcode.Kind RETURN
    Return from method.
    See Also:
      - `ReturnInstruction`
      - `Opcode.IRETURN`
      - `Opcode.LRETURN`
      - `Opcode.FRETURN`
      - `Opcode.DRETURN`
      - `Opcode.ARETURN`
      - `Opcode.RETURN`

  - ### THROW_EXCEPTION

    public static final Opcode.Kind THROW_EXCEPTION
    Throw exception or error.
    See Also:
      - `ThrowInstruction`
      - `Opcode.ATHROW`

  - ### FIELD_ACCESS

    public static final Opcode.Kind FIELD_ACCESS
    Access field.
    See Also:
      - `FieldInstruction`
      - `Opcode.GETSTATIC`
      - `Opcode.PUTSTATIC`
      - `Opcode.GETFIELD`
      - `Opcode.PUTFIELD`

  - ### INVOKE

    public static final Opcode.Kind INVOKE
    Invoke method or constructor.
    See Also:
      - `InvokeInstruction`
      - `Opcode.INVOKEVIRTUAL`
      - `Opcode.INVOKESPECIAL`
      - `Opcode.INVOKESTATIC`
      - `Opcode.INVOKEINTERFACE`

  - ### INVOKE_DYNAMIC

    public static final Opcode.Kind INVOKE_DYNAMIC
    Invoke a dynamically-computed call site.
    See Also:
      - `InvokeDynamicInstruction`
      - `Opcode.INVOKEDYNAMIC`

  - ### NEW_OBJECT

    public static final Opcode.Kind NEW_OBJECT
    Create new object.
    See Also:
      - `NewObjectInstruction`
      - `Opcode.NEW`

  - ### NEW_PRIMITIVE_ARRAY

    public static final Opcode.Kind NEW_PRIMITIVE_ARRAY
    Create new array.
    See Also:
      - `NewPrimitiveArrayInstruction`
      - `Opcode.NEWARRAY`

  - ### NEW_REF_ARRAY

    public static final Opcode.Kind NEW_REF_ARRAY
    Create new `reference` array.
    See Also:
      - `NewReferenceArrayInstruction`
      - `Opcode.ANEWARRAY`

  - ### NEW_MULTI_ARRAY

    public static final Opcode.Kind NEW_MULTI_ARRAY
    Create new multidimensional array.
    See Also:
      - `NewMultiArrayInstruction`
      - `Opcode.MULTIANEWARRAY`

  - ### TYPE_CHECK

    public static final Opcode.Kind TYPE_CHECK
    Check whether object is of given type.
    See Also:
      - `TypeCheckInstruction`
      - `Opcode.CHECKCAST`
      - `Opcode.INSTANCEOF`

  - ### ARRAY_LOAD

    public static final Opcode.Kind ARRAY_LOAD
    Load from array.
    See Also:
      - `ArrayLoadInstruction`
      - `Opcode.IALOAD`
      - `Opcode.LALOAD`
      - `Opcode.FALOAD`
      - `Opcode.DALOAD`
      - `Opcode.AALOAD`
      - `Opcode.BALOAD`
      - `Opcode.CALOAD`
      - `Opcode.SALOAD`

  - ### ARRAY_STORE

    public static final Opcode.Kind ARRAY_STORE
    Store into array.
    See Also:
      - `ArrayStoreInstruction`
      - `Opcode.IASTORE`
      - `Opcode.LASTORE`
      - `Opcode.FASTORE`
      - `Opcode.DASTORE`
      - `Opcode.AASTORE`
      - `Opcode.BASTORE`
      - `Opcode.CASTORE`
      - `Opcode.SASTORE`

  - ### STACK

    public static final Opcode.Kind STACK
    Stack operations.
    See Also:
      - `StackInstruction`
      - `Opcode.POP`
      - `Opcode.POP2`
      - `Opcode.DUP`
      - `Opcode.DUP_X1`
      - `Opcode.DUP_X2`
      - `Opcode.DUP2`
      - `Opcode.DUP2_X1`
      - `Opcode.DUP2_X2`
      - `Opcode.SWAP`

  - ### CONVERT

    public static final Opcode.Kind CONVERT
    Type conversions.
    See Also:
      - `ConvertInstruction`
      - `Opcode.I2L`
      - `Opcode.I2F`
      - `Opcode.I2D`
      - `Opcode.L2I`
      - `Opcode.L2F`
      - `Opcode.L2D`
      - `Opcode.F2I`
      - `Opcode.F2L`
      - `Opcode.F2D`
      - `Opcode.D2I`
      - `Opcode.D2L`
      - `Opcode.D2F`
      - `Opcode.I2B`
      - `Opcode.I2C`
      - `Opcode.I2S`

  - ### OPERATOR

    public static final Opcode.Kind OPERATOR
    Operators.
    See Also:
      - `OperatorInstruction`
      - `Opcode.IADD`
      - `Opcode.LADD`
      - `Opcode.FADD`
      - `Opcode.DADD`
      - `Opcode.ISUB`
      - `Opcode.LSUB`
      - `Opcode.FSUB`
      - `Opcode.DSUB`
      - `Opcode.IMUL`
      - `Opcode.LMUL`
      - `Opcode.FMUL`
      - `Opcode.DMUL`
      - `Opcode.IDIV`
      - `Opcode.LDIV`
      - `Opcode.FDIV`
      - `Opcode.DDIV`
      - `Opcode.IREM`
      - `Opcode.LREM`
      - `Opcode.FREM`
      - `Opcode.DREM`
      - `Opcode.INEG`
      - `Opcode.LNEG`
      - `Opcode.FNEG`
      - `Opcode.DNEG`
      - `Opcode.ISHL`
      - `Opcode.LSHL`
      - `Opcode.ISHR`
      - `Opcode.LSHR`
      - `Opcode.IUSHR`
      - `Opcode.LUSHR`
      - `Opcode.IAND`
      - `Opcode.LAND`
      - `Opcode.IOR`
      - `Opcode.LOR`
      - `Opcode.IXOR`
      - `Opcode.LXOR`
      - `Opcode.LCMP`
      - `Opcode.FCMPL`
      - `Opcode.FCMPG`
      - `Opcode.DCMPL`
      - `Opcode.DCMPG`
      - `Opcode.ARRAYLENGTH`

  - ### CONSTANT

    public static final Opcode.Kind CONSTANT
    Constants.
    See Also:
      - `ConstantInstruction`
      - `Opcode.ACONST_NULL`
      - `Opcode.ICONST_M1`
      - `Opcode.ICONST_0`
      - `Opcode.ICONST_1`
      - `Opcode.ICONST_2`
      - `Opcode.ICONST_3`
      - `Opcode.ICONST_4`
      - `Opcode.ICONST_5`
      - `Opcode.LCONST_0`
      - `Opcode.LCONST_1`
      - `Opcode.FCONST_0`
      - `Opcode.FCONST_1`
      - `Opcode.FCONST_2`
      - `Opcode.DCONST_0`
      - `Opcode.DCONST_1`
      - `Opcode.BIPUSH`
      - `Opcode.SIPUSH`
      - `Opcode.LDC`
      - `Opcode.LDC_W`
      - `Opcode.LDC2_W`

  - ### MONITOR

    public static final Opcode.Kind MONITOR
    Monitor.
    See Also:
      - `MonitorInstruction`
      - `Opcode.MONITORENTER`
      - `Opcode.MONITOREXIT`

  - ### NOP

    public static final Opcode.Kind NOP
    Do nothing.
    See Also:
      - `NopInstruction`
      - `Opcode.NOP`

  - ### DISCONTINUED_JSR

    public static final Opcode.Kind DISCONTINUED_JSR
    Discontinued jump subroutine.
    See Also:
      - `DiscontinuedInstruction.JsrInstruction`
      - `Opcode.JSR`
      - `Opcode.JSR_W`

  - ### DISCONTINUED_RET

    public static final Opcode.Kind DISCONTINUED_RET
    Discontinued return from subroutine.
    See Also:
      - `DiscontinuedInstruction.RetInstruction`
      - `Opcode.RET`
      - `Opcode.RET_W`

- ## Method Details

  - ### values

    public static Opcode.Kind[] 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 Opcode.Kind 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