W3cubDocs

/OpenJDK 25

Enum Class Opcode

java.lang.Object
java.lang.Enum<Opcode>
java.lang.classfile.Opcode
All Implemented Interfaces:
Serializable, Comparable<Opcode>, Constable
public enum Opcode extends Enum<Opcode>
Describes the opcodes of the JVM instruction set, as described in JVMS 6.5. This includes a few pseudo-opcodes modified by wide.

An opcode describes the operation of an instruction.

API Note:
The enum constants are named after the opcodes' mnemonics in uppercase. Wide pseudo-opcodes are named with the original opcodes' mnemonic plus a _W suffix. However, ldc_w, ldc2_w, goto_w, and jsr_w are legitimate opcodes instead of wide pseudo-opcodes.
See Java Virtual Machine Specification:
6.5 Instructions
Since:
24
See Also:

Nested Class Summary

Modifier and Type Class Description
static enum  Opcode.Kind
Kinds of opcodes.

Nested classes/interfaces declared in class Enum

Enum.EnumDesc<E>

Enum Constant Summary

Enum Constant Description
AALOAD
Load reference from array.
AASTORE
Store into reference array.
ACONST_NULL
Push null.
ALOAD
Load reference from local variable.
ALOAD_0
Load reference from local variable slot 0.
ALOAD_1
Load reference from local variable slot 1.
ALOAD_2
Load reference from local variable slot 2.
ALOAD_3
Load reference from local variable slot 3.
ALOAD_W
Load reference from local variable (wide index).
ANEWARRAY
Create new array of reference.
ARETURN
Return reference from method.
ARRAYLENGTH
Get length of array.
ASTORE
Store reference into local variable.
ASTORE_0
Store reference into local variable slot 0.
ASTORE_1
Store reference into local variable slot 1.
ASTORE_2
Store reference into local variable slot 2.
ASTORE_3
Store reference into local variable slot 3.
ASTORE_W
Store reference into local variable (wide index).
ATHROW
Throw exception or error.
BALOAD
Load byte or boolean from array.
BASTORE
Store into byte or boolean array.
BIPUSH
Push int value from sign-extension of immediate byte value.
CALOAD
Load char from array.
CASTORE
Store into char array.
CHECKCAST
Check whether object is of given type.
D2F
Convert double to float.
D2I
Convert double to int.
D2L
Convert double to long.
DADD
Add double.
DALOAD
Load double from array.
DASTORE
Store into double array.
DCMPG
Compare double.
DCMPL
Compare double.
DCONST_0
Push double constant 0.0D.
DCONST_1
Push double constant 1.0D.
DDIV
Divide double.
DLOAD
Load double from local variable.
DLOAD_0
Load double from local variable slot 0.
DLOAD_1
Load double from local variable slot 1.
DLOAD_2
Load double from local variable slot 2.
DLOAD_3
Load double from local variable slot 3.
DLOAD_W
Load double from local variable (wide index).
DMUL
Multiply double.
DNEG
Negate double.
DREM
Remainder double.
DRETURN
Return double from method.
DSTORE
Store double into local variable.
DSTORE_0
Store double into local variable slot 0.
DSTORE_1
Store double into local variable slot 1.
DSTORE_2
Store double into local variable slot 2.
DSTORE_3
Store double into local variable slot 3.
DSTORE_W
Store double into local variable (wide index).
DSUB
Subtract double.
DUP
Duplicate the top operand stack value.
DUP_X1
Duplicate the top operand stack value and insert two values down.
DUP_X2
Duplicate the top operand stack value and insert two or three values down.
DUP2
Duplicate the top one or two operand stack values.
DUP2_X1
Duplicate the top one or two operand stack values and insert two or three values down.
DUP2_X2
Duplicate the top one or two operand stack values and insert two, three, or four values down.
F2D
Convert float to double.
F2I
Convert float to int.
F2L
Convert float to long.
FADD
Add float.
FALOAD
Load float from array.
FASTORE
Store into float array.
FCMPG
Compare float.
FCMPL
Compare float.
FCONST_0
Push float constant 0.0F.
FCONST_1
Push float constant 1.0F.
FCONST_2
Push float constant 2.0F.
FDIV
Divide float.
FLOAD
Load float from local variable.
FLOAD_0
Load float from local variable slot 0.
FLOAD_1
Load float from local variable slot 1.
FLOAD_2
Load float from local variable slot 2.
FLOAD_3
Load float from local variable slot 3.
FLOAD_W
Load float from local variable (wide index).
FMUL
Multiply float.
FNEG
Negate float.
FREM
Remainder float.
FRETURN
Return float from method.
FSTORE
Store float into local variable.
FSTORE_0
Store float into local variable slot 0.
FSTORE_1
Store float into local variable slot 1.
FSTORE_2
Store float into local variable slot 2.
FSTORE_3
Store float into local variable slot 3.
FSTORE_W
Store float into local variable (wide index).
FSUB
Subtract float.
GETFIELD
Fetch field from object.
GETSTATIC
Get static field from class.
GOTO
Branch always.
GOTO_W
Branch always (wide index).
I2B
Convert int to byte.
I2C
Convert int to char.
I2D
Convert int to double.
I2F
Convert int to float.
I2L
Convert int to long.
I2S
Convert int to short.
IADD
Add int.
IALOAD
Load int from array.
IAND
Bitwise AND int.
IASTORE
Store into int array.
ICONST_0
Push int constant 0.
ICONST_1
Push int constant 1.
ICONST_2
Push int constant 2.
ICONST_3
Push int constant 3.
ICONST_4
Push int constant 4.
ICONST_5
Push int constant 5.
ICONST_M1
Push int constant -1.
IDIV
Divide int.
IF_ACMPEQ
Branch if reference comparison operand1 == operand2 succeeds.
IF_ACMPNE
Branch if reference comparison operand1 != operand2 succeeds.
IF_ICMPEQ
Branch if int comparison operand1 == operand2 succeeds.
IF_ICMPGE
Branch if int comparison operand1 >= operand2 succeeds.
IF_ICMPGT
Branch if int comparison operand1 > operand2 succeeds.
IF_ICMPLE
Branch if int comparison operand1 <= operand2 succeeds.
IF_ICMPLT
Branch if int comparison operand1 < operand2 succeeds.
IF_ICMPNE
Branch if int comparison operand1 != operand2 succeeds.
IFEQ
Branch if int comparison == 0 succeeds.
IFGE
Branch if int comparison >= 0 succeeds.
IFGT
Branch if int comparison > 0 succeeds.
IFLE
Branch if int comparison <= 0 succeeds.
IFLT
Branch if int comparison < 0 succeeds.
IFNE
Branch if int comparison != 0 succeeds.
IFNONNULL
Branch if reference is not null.
IFNULL
Branch if reference is null.
IINC
Increment int local variable by constant.
IINC_W
Increment local variable by constant (wide index).
ILOAD
Load int from local variable.
ILOAD_0
Load int from local variable slot 0.
ILOAD_1
Load int from local variable slot 1.
ILOAD_2
Load int from local variable slot 2.
ILOAD_3
Load int from local variable slot 3.
ILOAD_W
Load int from local variable (wide index).
IMUL
Multiply int.
INEG
Negate int.
INSTANCEOF
Determine if object is of given type.
INVOKEDYNAMIC
Invoke a dynamically-computed call site.
INVOKEINTERFACE
Invoke interface method.
INVOKESPECIAL
Invoke instance method; direct invocation of instance initialization methods and methods of the current class and its supertypes.
INVOKESTATIC
Invoke a class (static) method.
INVOKEVIRTUAL
Invoke instance method; dispatch based on class.
IOR
Bitwise OR int.
IREM
Remainder int.
IRETURN
Return int from method.
ISHL
Shift left int.
ISHR
Arithmetic shift right int.
ISTORE
Store int into local variable.
ISTORE_0
Store int into local variable slot 0.
ISTORE_1
Store int into local variable slot 1.
ISTORE_2
Store int into local variable slot 2.
ISTORE_3
Store int into local variable slot 3.
ISTORE_W
Store int into local variable (wide index).
ISUB
Subtract int.
IUSHR
Logical shift right int.
IXOR
Bitwise XOR int.
JSR
(Discontinued) Jump subroutine; last used in major version 50.
JSR_W
(Discontinued) Jump subroutine (wide index); last used in major version 50.
L2D
Convert long to double.
L2F
Convert long to float.
L2I
Convert long to int.
LADD
Add long.
LALOAD
Load long from array.
LAND
Bitwise AND long.
LASTORE
Store into long array.
LCMP
Compare long.
LCONST_0
Push long constant 0L.
LCONST_1
Push long constant 1L.
LDC
Push item from run-time constant pool.
LDC_W
Push item from run-time constant pool (wide index).
LDC2_W
Push long or double from run-time constant pool (wide index).
LDIV
Divide long.
LLOAD
Load long from local variable.
LLOAD_0
Load long from local variable slot 0.
LLOAD_1
Load long from local variable slot 1.
LLOAD_2
Load long from local variable slot 2.
LLOAD_3
Load long from local variable slot 3.
LLOAD_W
Load long from local variable (wide index).
LMUL
Multiply long.
LNEG
Negate long.
LOOKUPSWITCH
Access jump table by key match and jump.
LOR
Bitwise OR long.
LREM
Remainder long.
LRETURN
Return long from method.
LSHL
Shift left long.
LSHR
Arithmetic shift right long.
LSTORE
Store long into local variable.
LSTORE_0
Store long into local variable slot 0.
LSTORE_1
Store long into local variable slot 1.
LSTORE_2
Store long into local variable slot 2.
LSTORE_3
Store long into local variable slot 3.
LSTORE_W
Store long into local variable (wide index).
LSUB
Subtract long.
LUSHR
Logical shift right long.
LXOR
Bitwise XOR long.
MONITORENTER
Enter monitor for object.
MONITOREXIT
Exit monitor for object.
MULTIANEWARRAY
Create new multidimensional array.
NEW
Create new object.
NEWARRAY
Create new array.
NOP
Do nothing.
POP
Pop the top operand stack value.
POP2
Pop the top one or two operand stack values.
PUTFIELD
Set field in object.
PUTSTATIC
Set static field in class.
RET
(Discontinued) Return from subroutine; last used in major version 50.
RET_W
(Discontinued) Return from subroutine (wide index); last used in major version 50.
RETURN
Return void from method.
SALOAD
Load short from array.
SASTORE
Store into short array.
SIPUSH
Push int value from sign-extension of immediate short value.
SWAP
Swap the top two operand stack values.
TABLESWITCH
Access jump table by index and jump.

Method Summary

Modifier and Type Method Description
int bytecode()
Returns the opcode value.
boolean isWide()
Returns true if this is a pseudo-opcode modified by wide opcode.
Opcode.Kind kind()
Returns operation kind.
int sizeIfFixed()
Returns size of the instruction in bytes if fixed, or -1 otherwise.
static Opcode valueOf(String name)
Returns the enum constant of this class with the specified name.
static Opcode[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Methods declared in class Object

getClass, notify, notifyAll, wait, wait, wait

Enum Constant Details

NOP

public static final Opcode NOP
Do nothing.
See Java Virtual Machine Specification:
6.5.nop nop
See Also:

ACONST_NULL

public static final Opcode ACONST_NULL
Push null.
See Java Virtual Machine Specification:
6.5.aconst_null aconst_null
See Also:

ICONST_M1

public static final Opcode ICONST_M1
Push int constant -1.
See Java Virtual Machine Specification:
6.5.iconst_i iconst_<i>
See Also:

ICONST_0

public static final Opcode ICONST_0
Push int constant 0.
See Java Virtual Machine Specification:
6.5.iconst_i iconst_<i>
See Also:

ICONST_1

public static final Opcode ICONST_1
Push int constant 1.
See Java Virtual Machine Specification:
6.5.iconst_i iconst_<i>
See Also:

ICONST_2

public static final Opcode ICONST_2
Push int constant 2.
See Java Virtual Machine Specification:
6.5.iconst_i iconst_<i>
See Also:

ICONST_3

public static final Opcode ICONST_3
Push int constant 3.
See Java Virtual Machine Specification:
6.5.iconst_i iconst_<i>
See Also:

ICONST_4

public static final Opcode ICONST_4
Push int constant 4.
See Java Virtual Machine Specification:
6.5.iconst_i iconst_<i>
See Also:

ICONST_5

public static final Opcode ICONST_5
Push int constant 5.
See Java Virtual Machine Specification:
6.5.iconst_i iconst_<i>
See Also:

LCONST_0

public static final Opcode LCONST_0
Push long constant 0L.
See Java Virtual Machine Specification:
6.5.lconst_l lconst_<l>
See Also:

LCONST_1

public static final Opcode LCONST_1
Push long constant 1L.
See Java Virtual Machine Specification:
6.5.lconst_l lconst_<l>
See Also:

FCONST_0

public static final Opcode FCONST_0
Push float constant 0.0F.
See Java Virtual Machine Specification:
6.5.fconst_f fconst_<f>
See Also:

FCONST_1

public static final Opcode FCONST_1
Push float constant 1.0F.
See Java Virtual Machine Specification:
6.5.fconst_f fconst_<f>
See Also:

FCONST_2

public static final Opcode FCONST_2
Push float constant 2.0F.
See Java Virtual Machine Specification:
6.5.fconst_f fconst_<f>
See Also:

DCONST_0

public static final Opcode DCONST_0
Push double constant 0.0D.
See Java Virtual Machine Specification:
6.5.dconst_d dconst_<d>
See Also:

DCONST_1

public static final Opcode DCONST_1
Push double constant 1.0D.
See Java Virtual Machine Specification:
6.5.dconst_d dconst_<d>
See Also:

BIPUSH

public static final Opcode BIPUSH
Push int value from sign-extension of immediate byte value.
See Java Virtual Machine Specification:
6.5.bipush bipush
See Also:

SIPUSH

public static final Opcode SIPUSH
Push int value from sign-extension of immediate short value.
See Java Virtual Machine Specification:
6.5.sipush sipush
See Also:

LDC

public static final Opcode LDC
Push item from run-time constant pool.
See Java Virtual Machine Specification:
6.5.ldc ldc
See Also:

LDC_W

public static final Opcode LDC_W
Push item from run-time constant pool (wide index).
See Java Virtual Machine Specification:
6.5.ldc_w ldc_w
See Also:

LDC2_W

public static final Opcode LDC2_W
Push long or double from run-time constant pool (wide index).
See Java Virtual Machine Specification:
6.5.ldc2_w ldc2_w
See Also:

ILOAD

public static final Opcode ILOAD
Load int from local variable.
See Java Virtual Machine Specification:
6.5.iload iload
See Also:

LLOAD

public static final Opcode LLOAD
Load long from local variable.
See Java Virtual Machine Specification:
6.5.lload lload
See Also:

FLOAD

public static final Opcode FLOAD
Load float from local variable.
See Java Virtual Machine Specification:
6.5.fload fload
See Also:

DLOAD

public static final Opcode DLOAD
Load double from local variable.
See Java Virtual Machine Specification:
6.5.dload dload
See Also:

ALOAD

public static final Opcode ALOAD
Load reference from local variable.
See Java Virtual Machine Specification:
6.5.aload aload
See Also:

ILOAD_0

public static final Opcode ILOAD_0
Load int from local variable slot 0.
See Java Virtual Machine Specification:
6.5.iload_n iload_<n>
See Also:

ILOAD_1

public static final Opcode ILOAD_1
Load int from local variable slot 1.
See Java Virtual Machine Specification:
6.5.iload_n iload_<n>
See Also:

ILOAD_2

public static final Opcode ILOAD_2
Load int from local variable slot 2.
See Java Virtual Machine Specification:
6.5.iload_n iload_<n>
See Also:

ILOAD_3

public static final Opcode ILOAD_3
Load int from local variable slot 3.
See Java Virtual Machine Specification:
6.5.iload_n iload_<n>
See Also:

LLOAD_0

public static final Opcode LLOAD_0
Load long from local variable slot 0.
See Java Virtual Machine Specification:
6.5.lload_n lload_<n>
See Also:

LLOAD_1

public static final Opcode LLOAD_1
Load long from local variable slot 1.
See Java Virtual Machine Specification:
6.5.lload_n lload_<n>
See Also:

LLOAD_2

public static final Opcode LLOAD_2
Load long from local variable slot 2.
See Java Virtual Machine Specification:
6.5.lload_n lload_<n>
See Also:

LLOAD_3

public static final Opcode LLOAD_3
Load long from local variable slot 3.
See Java Virtual Machine Specification:
6.5.lload_n lload_<n>
See Also:

FLOAD_0

public static final Opcode FLOAD_0
Load float from local variable slot 0.
See Java Virtual Machine Specification:
6.5.fload_n fload_<n>
See Also:

FLOAD_1

public static final Opcode FLOAD_1
Load float from local variable slot 1.
See Java Virtual Machine Specification:
6.5.fload_n fload_<n>
See Also:

FLOAD_2

public static final Opcode FLOAD_2
Load float from local variable slot 2.
See Java Virtual Machine Specification:
6.5.fload_n fload_<n>
See Also:

FLOAD_3

public static final Opcode FLOAD_3
Load float from local variable slot 3.
See Java Virtual Machine Specification:
6.5.fload_n fload_<n>
See Also:

DLOAD_0

public static final Opcode DLOAD_0
Load double from local variable slot 0.
See Java Virtual Machine Specification:
6.5.dload_n dload_<n>
See Also:

DLOAD_1

public static final Opcode DLOAD_1
Load double from local variable slot 1.
See Java Virtual Machine Specification:
6.5.dload_n dload_<n>
See Also:

DLOAD_2

public static final Opcode DLOAD_2
Load double from local variable slot 2.
See Java Virtual Machine Specification:
6.5.dload_n dload_<n>
See Also:

DLOAD_3

public static final Opcode DLOAD_3
Load double from local variable slot 3.
See Java Virtual Machine Specification:
6.5.dload_n dload_<n>
See Also:

ALOAD_0

public static final Opcode ALOAD_0
Load reference from local variable slot 0.
See Java Virtual Machine Specification:
6.5.aload_n aload_<n>
See Also:

ALOAD_1

public static final Opcode ALOAD_1
Load reference from local variable slot 1.
See Java Virtual Machine Specification:
6.5.aload_n aload_<n>
See Also:

ALOAD_2

public static final Opcode ALOAD_2
Load reference from local variable slot 2.
See Java Virtual Machine Specification:
6.5.aload_n aload_<n>
See Also:

ALOAD_3

public static final Opcode ALOAD_3
Load reference from local variable slot 3.
See Java Virtual Machine Specification:
6.5.aload_n aload_<n>
See Also:

IALOAD

public static final Opcode IALOAD
Load int from array.
See Java Virtual Machine Specification:
6.5.iaload iaload
See Also:

LALOAD

public static final Opcode LALOAD
Load long from array.
See Java Virtual Machine Specification:
6.5.laload laload
See Also:

FALOAD

public static final Opcode FALOAD
Load float from array.
See Java Virtual Machine Specification:
6.5.faload faload
See Also:

DALOAD

public static final Opcode DALOAD
Load double from array.
See Java Virtual Machine Specification:
6.5.daload daload
See Also:

AALOAD

public static final Opcode AALOAD
Load reference from array.
See Java Virtual Machine Specification:
6.5.aaload aaload
See Also:

BALOAD

public static final Opcode BALOAD
Load byte or boolean from array.
See Java Virtual Machine Specification:
6.5.baload baload
See Also:

CALOAD

public static final Opcode CALOAD
Load char from array.
See Java Virtual Machine Specification:
6.5.caload caload
See Also:

SALOAD

public static final Opcode SALOAD
Load short from array.
See Java Virtual Machine Specification:
6.5.saload saload
See Also:

ISTORE

public static final Opcode ISTORE
Store int into local variable.
See Java Virtual Machine Specification:
6.5.istore istore
See Also:

LSTORE

public static final Opcode LSTORE
Store long into local variable.
See Java Virtual Machine Specification:
6.5.lstore lstore
See Also:

FSTORE

public static final Opcode FSTORE
Store float into local variable.
See Java Virtual Machine Specification:
6.5.fstore fstore
See Also:

DSTORE

public static final Opcode DSTORE
Store double into local variable.
See Java Virtual Machine Specification:
6.5.dstore dstore
See Also:

ASTORE

public static final Opcode ASTORE
Store reference into local variable. Can also store the returnAddress type.
See Java Virtual Machine Specification:
6.5.astore astore
See Also:

ISTORE_0

public static final Opcode ISTORE_0
Store int into local variable slot 0.
See Java Virtual Machine Specification:
6.5.istore_n istore_<n>
See Also:

ISTORE_1

public static final Opcode ISTORE_1
Store int into local variable slot 1.
See Java Virtual Machine Specification:
6.5.istore_n istore_<n>
See Also:

ISTORE_2

public static final Opcode ISTORE_2
Store int into local variable slot 2.
See Java Virtual Machine Specification:
6.5.istore_n istore_<n>
See Also:

ISTORE_3

public static final Opcode ISTORE_3
Store int into local variable slot 3.
See Java Virtual Machine Specification:
6.5.istore_n istore_<n>
See Also:

LSTORE_0

public static final Opcode LSTORE_0
Store long into local variable slot 0.
See Java Virtual Machine Specification:
6.5.lstore_n lstore_<n>
See Also:

LSTORE_1

public static final Opcode LSTORE_1
Store long into local variable slot 1.
See Java Virtual Machine Specification:
6.5.lstore_n lstore_<n>
See Also:

LSTORE_2

public static final Opcode LSTORE_2
Store long into local variable slot 2.
See Java Virtual Machine Specification:
6.5.lstore_n lstore_<n>
See Also:

LSTORE_3

public static final Opcode LSTORE_3
Store long into local variable slot 3.
See Java Virtual Machine Specification:
6.5.lstore_n lstore_<n>
See Also:

FSTORE_0

public static final Opcode FSTORE_0
Store float into local variable slot 0.
See Java Virtual Machine Specification:
6.5.fstore_n fstore_<n>
See Also:

FSTORE_1

public static final Opcode FSTORE_1
Store float into local variable slot 1.
See Java Virtual Machine Specification:
6.5.fstore_n fstore_<n>
See Also:

FSTORE_2

public static final Opcode FSTORE_2
Store float into local variable slot 2.
See Java Virtual Machine Specification:
6.5.fstore_n fstore_<n>
See Also:

FSTORE_3

public static final Opcode FSTORE_3
Store float into local variable slot 3.
See Java Virtual Machine Specification:
6.5.fstore_n fstore_<n>
See Also:

DSTORE_0

public static final Opcode DSTORE_0
Store double into local variable slot 0.
See Java Virtual Machine Specification:
6.5.dstore_n dstore_<n>
See Also:

DSTORE_1

public static final Opcode DSTORE_1
Store double into local variable slot 1.
See Java Virtual Machine Specification:
6.5.dstore_n dstore_<n>
See Also:

DSTORE_2

public static final Opcode DSTORE_2
Store double into local variable slot 2.
See Java Virtual Machine Specification:
6.5.dstore_n dstore_<n>
See Also:

DSTORE_3

public static final Opcode DSTORE_3
Store double into local variable slot 3.
See Java Virtual Machine Specification:
6.5.dstore_n dstore_<n>
See Also:

ASTORE_0

public static final Opcode ASTORE_0
Store reference into local variable slot 0. Can also store the returnAddress type.
See Java Virtual Machine Specification:
6.5.astore_n astore_<n>
See Also:

ASTORE_1

public static final Opcode ASTORE_1
Store reference into local variable slot 1. Can also store the returnAddress type.
See Java Virtual Machine Specification:
6.5.astore_n astore_<n>
See Also:

ASTORE_2

public static final Opcode ASTORE_2
Store reference into local variable slot 2. Can also store the returnAddress type.
See Java Virtual Machine Specification:
6.5.astore_n astore_<n>
See Also:

ASTORE_3

public static final Opcode ASTORE_3
Store reference into local variable slot 3. Can also store the returnAddress type.
See Java Virtual Machine Specification:
6.5.astore_n astore_<n>
See Also:

IASTORE

public static final Opcode IASTORE
Store into int array.
See Java Virtual Machine Specification:
6.5.iastore iastore
See Also:

LASTORE

public static final Opcode LASTORE
Store into long array.
See Java Virtual Machine Specification:
6.5.lastore lastore
See Also:

FASTORE

public static final Opcode FASTORE
Store into float array.
See Java Virtual Machine Specification:
6.5.fastore fastore
See Also:

DASTORE

public static final Opcode DASTORE
Store into double array.
See Java Virtual Machine Specification:
6.5.dastore dastore
See Also:

AASTORE

public static final Opcode AASTORE
Store into reference array.
See Java Virtual Machine Specification:
6.5.aastore aastore
See Also:

BASTORE

public static final Opcode BASTORE
Store into byte or boolean array.
See Java Virtual Machine Specification:
6.5.bastore bastore
See Also:

CASTORE

public static final Opcode CASTORE
Store into char array.
See Java Virtual Machine Specification:
6.5.castore castore
See Also:

SASTORE

public static final Opcode SASTORE
Store into short array.
See Java Virtual Machine Specification:
6.5.sastore sastore
See Also:

POP

public static final Opcode POP
Pop the top operand stack value.
See Java Virtual Machine Specification:
6.5.pop pop
See Also:

POP2

public static final Opcode POP2
Pop the top one or two operand stack values.
See Java Virtual Machine Specification:
6.5.pop2 pop2
See Also:

DUP

public static final Opcode DUP
Duplicate the top operand stack value.
See Java Virtual Machine Specification:
6.5.dup dup
See Also:

DUP_X1

public static final Opcode DUP_X1
Duplicate the top operand stack value and insert two values down.
See Java Virtual Machine Specification:
6.5.dup_x1 dup_x1
See Also:

DUP_X2

public static final Opcode DUP_X2
Duplicate the top operand stack value and insert two or three values down.
See Java Virtual Machine Specification:
6.5.dup_x2 dup_x2
See Also:

DUP2

public static final Opcode DUP2
Duplicate the top one or two operand stack values.
See Java Virtual Machine Specification:
6.5.dup2 dup2
See Also:

DUP2_X1

public static final Opcode DUP2_X1
Duplicate the top one or two operand stack values and insert two or three values down.
See Java Virtual Machine Specification:
6.5.dup2_x1 dup2_x1
See Also:

DUP2_X2

public static final Opcode DUP2_X2
Duplicate the top one or two operand stack values and insert two, three, or four values down.
See Java Virtual Machine Specification:
6.5.dup2_x2 dup2_x2
See Also:

SWAP

public static final Opcode SWAP
Swap the top two operand stack values.
See Java Virtual Machine Specification:
6.5.swap swap
See Also:

IADD

public static final Opcode IADD
Add int.
See Java Virtual Machine Specification:
6.5.iadd iadd
See Also:

LADD

public static final Opcode LADD
Add long.
See Java Virtual Machine Specification:
6.5.ladd ladd
See Also:

FADD

public static final Opcode FADD
Add float.
See Java Virtual Machine Specification:
6.5.fadd fadd
See Also:

DADD

public static final Opcode DADD
Add double.
See Java Virtual Machine Specification:
6.5.dadd dadd
See Also:

ISUB

public static final Opcode ISUB
Subtract int.
See Java Virtual Machine Specification:
6.5.isub isub
See Also:

LSUB

public static final Opcode LSUB
Subtract long.
See Java Virtual Machine Specification:
6.5.lsub lsub
See Also:

FSUB

public static final Opcode FSUB
Subtract float.
See Java Virtual Machine Specification:
6.5.fsub fsub
See Also:

DSUB

public static final Opcode DSUB
Subtract double.
See Java Virtual Machine Specification:
6.5.dsub dsub
See Also:

IMUL

public static final Opcode IMUL
Multiply int.
See Java Virtual Machine Specification:
6.5.imul imul
See Also:

LMUL

public static final Opcode LMUL
Multiply long.
See Java Virtual Machine Specification:
6.5.lmul lmul
See Also:

FMUL

public static final Opcode FMUL
Multiply float.
See Java Virtual Machine Specification:
6.5.fmul fmul
See Also:

DMUL

public static final Opcode DMUL
Multiply double.
See Java Virtual Machine Specification:
6.5.dmul dmul
See Also:

IDIV

public static final Opcode IDIV
Divide int.
See Java Virtual Machine Specification:
6.5.idiv idiv
See Also:

LDIV

public static final Opcode LDIV
Divide long.
See Java Virtual Machine Specification:
6.5.ldiv ldiv
See Also:

FDIV

public static final Opcode FDIV
Divide float.
See Java Virtual Machine Specification:
6.5.fdiv fdiv
See Also:

DDIV

public static final Opcode DDIV
Divide double.
See Java Virtual Machine Specification:
6.5.ddiv ddiv
See Also:

IREM

public static final Opcode IREM
Remainder int.
See Java Virtual Machine Specification:
6.5.irem irem
See Also:

LREM

public static final Opcode LREM
Remainder long.
See Java Virtual Machine Specification:
6.5.lrem lrem
See Also:

FREM

public static final Opcode FREM
Remainder float.
See Java Virtual Machine Specification:
6.5.frem frem
See Also:

DREM

public static final Opcode DREM
Remainder double.
See Java Virtual Machine Specification:
6.5.drem drem
See Also:

INEG

public static final Opcode INEG
Negate int.
See Java Virtual Machine Specification:
6.5.ineg ineg
See Also:

LNEG

public static final Opcode LNEG
Negate long.
See Java Virtual Machine Specification:
6.5.lneg lneg
See Also:

FNEG

public static final Opcode FNEG
Negate float.
See Java Virtual Machine Specification:
6.5.fneg fneg
See Also:

DNEG

public static final Opcode DNEG
Negate double.
See Java Virtual Machine Specification:
6.5.dneg dneg
See Also:

ISHL

public static final Opcode ISHL
Shift left int.
See Java Virtual Machine Specification:
6.5.ishl ishl
See Also:

LSHL

public static final Opcode LSHL
Shift left long.
See Java Virtual Machine Specification:
6.5.lshl lshl
See Also:

ISHR

public static final Opcode ISHR
Arithmetic shift right int.
See Java Virtual Machine Specification:
6.5.ishr ishr
See Also:

LSHR

public static final Opcode LSHR
Arithmetic shift right long.
See Java Virtual Machine Specification:
6.5.lshr lshr
See Also:

IUSHR

public static final Opcode IUSHR
Logical shift right int.
See Java Virtual Machine Specification:
6.5.iushr iushr
See Also:

LUSHR

public static final Opcode LUSHR
Logical shift right long.
See Java Virtual Machine Specification:
6.5.lushr lushr
See Also:

IAND

public static final Opcode IAND
Bitwise AND int.
API Note:
This may be used to implement boolean AND.
See Java Virtual Machine Specification:
6.5.iand iand
See Also:

LAND

public static final Opcode LAND
Bitwise AND long.
See Java Virtual Machine Specification:
6.5.land land
See Also:

IOR

public static final Opcode IOR
Bitwise OR int.
API Note:
This may be used to implement boolean OR.
See Java Virtual Machine Specification:
6.5.ior ior
See Also:

LOR

public static final Opcode LOR
Bitwise OR long.
See Java Virtual Machine Specification:
6.5.lor lor
See Also:

IXOR

public static final Opcode IXOR
Bitwise XOR int.
API Note:
This may be used to implement boolean XOR.
See Java Virtual Machine Specification:
6.5.ixor ixor
See Also:

LXOR

public static final Opcode LXOR
Bitwise XOR long.
See Java Virtual Machine Specification:
6.5.lxor lxor
See Also:

IINC

public static final Opcode IINC
Increment int local variable by constant.
See Java Virtual Machine Specification:
6.5.iinc iinc
See Also:

I2L

public static final Opcode I2L
Convert int to long.
See Java Language Specification:
5.1.2 Widening Primitive Conversion
See Java Virtual Machine Specification:
6.5.i2l i2l
See Also:

I2F

public static final Opcode I2F
Convert int to float.
See Java Language Specification:
5.1.2 Widening Primitive Conversion
See Java Virtual Machine Specification:
6.5.i2f i2f
See Also:

I2D

public static final Opcode I2D
Convert int to double.
See Java Language Specification:
5.1.2 Widening Primitive Conversion
See Java Virtual Machine Specification:
6.5.i2d i2d
See Also:

L2I

public static final Opcode L2I
Convert long to int.
See Java Language Specification:
5.1.3 Narrowing Primitive Conversion
See Java Virtual Machine Specification:
6.5.l2i l2i
See Also:

L2F

public static final Opcode L2F
Convert long to float.
See Java Language Specification:
5.1.2 Widening Primitive Conversion
See Java Virtual Machine Specification:
6.5.l2f l2f
See Also:

L2D

public static final Opcode L2D
Convert long to double.
See Java Language Specification:
5.1.2 Widening Primitive Conversion
See Java Virtual Machine Specification:
6.5.l2d l2d
See Also:

F2I

public static final Opcode F2I
Convert float to int.
See Java Language Specification:
5.1.3 Narrowing Primitive Conversion
See Java Virtual Machine Specification:
6.5.f2i f2i
See Also:

F2L

public static final Opcode F2L
Convert float to long.
See Java Language Specification:
5.1.3 Narrowing Primitive Conversion
See Java Virtual Machine Specification:
6.5.f2l f2l
See Also:

F2D

public static final Opcode F2D
Convert float to double.
See Java Language Specification:
5.1.2 Widening Primitive Conversion
See Java Virtual Machine Specification:
6.5.f2d f2d
See Also:

D2I

public static final Opcode D2I
Convert double to int.
See Java Language Specification:
5.1.3 Narrowing Primitive Conversion
See Java Virtual Machine Specification:
6.5.d2i d2i
See Also:

D2L

public static final Opcode D2L
Convert double to long.
See Java Virtual Machine Specification:
6.5.d2l d2l
See Also:

D2F

public static final Opcode D2F
Convert double to float.
See Java Language Specification:
5.1.3 Narrowing Primitive Conversion
See Java Virtual Machine Specification:
6.5.d2f d2f
See Also:

I2B

public static final Opcode I2B
Convert int to byte. This is as if storing the computational int into a byte and loading it back.
See Java Language Specification:
5.1.3 Narrowing Primitive Conversion
See Java Virtual Machine Specification:
6.5.i2b i2b
See Also:

I2C

public static final Opcode I2C
Convert int to char. This is as if storing the computational int into a char and loading it back.
See Java Language Specification:
5.1.3 Narrowing Primitive Conversion
See Java Virtual Machine Specification:
6.5.i2c i2c
See Also:

I2S

public static final Opcode I2S
Convert int to short. This is as if storing the computational int into a short and loading it back.
See Java Language Specification:
5.1.3 Narrowing Primitive Conversion
See Java Virtual Machine Specification:
6.5.i2s i2s
See Also:

LCMP

public static final Opcode LCMP
Compare long.
See Java Virtual Machine Specification:
6.5.lcmp lcmp
See Also:

FCMPL

public static final Opcode FCMPL
Compare float. Produces -1 if any operand is NaN.
See Java Virtual Machine Specification:
6.5.fcmp_op fcmp<op>
See Also:

FCMPG

public static final Opcode FCMPG
Compare float. Produces 1 if any operand is NaN.
See Java Virtual Machine Specification:
6.5.fcmp_op fcmp<op>
See Also:

DCMPL

public static final Opcode DCMPL
Compare double. Produces -1 if any operand is NaN.
See Java Virtual Machine Specification:
6.5.dcmp_op dcmp<op>
See Also:

DCMPG

public static final Opcode DCMPG
Compare double. Produces 1 if any operand is NaN.
See Java Virtual Machine Specification:
6.5.dcmp_op dcmp<op>
See Also:

IFEQ

public static final Opcode IFEQ
Branch if int comparison == 0 succeeds.
See Java Virtual Machine Specification:
6.5.if_cond if_<cond>
See Also:

IFNE

public static final Opcode IFNE
Branch if int comparison != 0 succeeds.
See Java Virtual Machine Specification:
6.5.if_cond if_<cond>
See Also:

IFLT

public static final Opcode IFLT
Branch if int comparison < 0 succeeds.
See Java Virtual Machine Specification:
6.5.if_cond if_<cond>
See Also:

IFGE

public static final Opcode IFGE
Branch if int comparison >= 0 succeeds.
See Java Virtual Machine Specification:
6.5.if_cond if_<cond>
See Also:

IFGT

public static final Opcode IFGT
Branch if int comparison > 0 succeeds.
See Java Virtual Machine Specification:
6.5.if_cond if_<cond>
See Also:

IFLE

public static final Opcode IFLE
Branch if int comparison <= 0 succeeds.
See Java Virtual Machine Specification:
6.5.if_cond if_<cond>
See Also:

IF_ICMPEQ

public static final Opcode IF_ICMPEQ
Branch if int comparison operand1 == operand2 succeeds.
See Java Virtual Machine Specification:
6.5.if_icmp_cond if_icmp<cond>
See Also:

IF_ICMPNE

public static final Opcode IF_ICMPNE
Branch if int comparison operand1 != operand2 succeeds.
See Java Virtual Machine Specification:
6.5.if_icmp_cond if_icmp<cond>
See Also:

IF_ICMPLT

public static final Opcode IF_ICMPLT
Branch if int comparison operand1 < operand2 succeeds.
See Java Virtual Machine Specification:
6.5.if_icmp_cond if_icmp<cond>
See Also:

IF_ICMPGE

public static final Opcode IF_ICMPGE
Branch if int comparison operand1 >= operand2 succeeds.
See Java Virtual Machine Specification:
6.5.if_icmp_cond if_icmp<cond>
See Also:

IF_ICMPGT

public static final Opcode IF_ICMPGT
Branch if int comparison operand1 > operand2 succeeds.
See Java Virtual Machine Specification:
6.5.if_icmp_cond if_icmp<cond>
See Also:

IF_ICMPLE

public static final Opcode IF_ICMPLE
Branch if int comparison operand1 <= operand2 succeeds.
See Java Virtual Machine Specification:
6.5.if_icmp_cond if_icmp<cond>
See Also:

IF_ACMPEQ

public static final Opcode IF_ACMPEQ
Branch if reference comparison operand1 == operand2 succeeds.
See Java Virtual Machine Specification:
6.5.if_acmp_cond if_acmp<cond>
See Also:

IF_ACMPNE

public static final Opcode IF_ACMPNE
Branch if reference comparison operand1 != operand2 succeeds.
See Java Virtual Machine Specification:
6.5.if_acmp_cond if_acmp<cond>
See Also:

GOTO

public static final Opcode GOTO
Branch always.
See Java Virtual Machine Specification:
6.5.goto goto
See Also:

JSR

public static final Opcode JSR
(Discontinued) Jump subroutine; last used in major version 50.
See Java Virtual Machine Specification:
4.9.1 Static Constraints
6.5.jsr jsr
See Also:

RET

public static final Opcode RET
(Discontinued) Return from subroutine; last used in major version 50.
See Java Virtual Machine Specification:
4.9.1 Static Constraints
6.5.ret ret
See Also:

TABLESWITCH

public static final Opcode TABLESWITCH
Access jump table by index and jump.
See Java Virtual Machine Specification:
6.5.tableswitch tableswitch
See Also:

LOOKUPSWITCH

public static final Opcode LOOKUPSWITCH
Access jump table by key match and jump.
See Java Virtual Machine Specification:
6.5.lookupswitch lookupswitch
See Also:

IRETURN

public static final Opcode IRETURN
Return int from method.
See Java Virtual Machine Specification:
6.5.ireturn ireturn
See Also:

LRETURN

public static final Opcode LRETURN
Return long from method.
See Java Virtual Machine Specification:
6.5.lreturn lreturn
See Also:

FRETURN

public static final Opcode FRETURN
Return float from method.
See Java Virtual Machine Specification:
6.5.freturn freturn
See Also:

DRETURN

public static final Opcode DRETURN
Return double from method.
See Java Virtual Machine Specification:
6.5.dreturn dreturn
See Also:

ARETURN

public static final Opcode ARETURN
Return reference from method.
See Java Virtual Machine Specification:
6.5.areturn areturn
See Also:

RETURN

public static final Opcode RETURN
Return void from method.
See Java Virtual Machine Specification:
6.5.return return
See Also:

GETSTATIC

public static final Opcode GETSTATIC
Get static field from class.
See Java Virtual Machine Specification:
6.5.getstatic getstatic
See Also:

PUTSTATIC

public static final Opcode PUTSTATIC
Set static field in class.
See Java Virtual Machine Specification:
6.5.putstatic putstatic
See Also:

GETFIELD

public static final Opcode GETFIELD
Fetch field from object.
See Java Virtual Machine Specification:
6.5.getfield getfield
See Also:

PUTFIELD

public static final Opcode PUTFIELD
Set field in object.
See Java Virtual Machine Specification:
6.5.putfield putfield
See Also:

INVOKEVIRTUAL

public static final Opcode INVOKEVIRTUAL
Invoke instance method; dispatch based on class.
See Java Virtual Machine Specification:
6.5.invokevirtual invokevirtual
See Also:

INVOKESPECIAL

public static final Opcode INVOKESPECIAL
Invoke instance method; direct invocation of instance initialization methods and methods of the current class and its supertypes.
See Java Virtual Machine Specification:
6.5.invokevirtual invokevirtual
See Also:

INVOKESTATIC

public static final Opcode INVOKESTATIC
Invoke a class (static) method.
See Java Virtual Machine Specification:
6.5.invokestatic invokestatic
See Also:

INVOKEINTERFACE

public static final Opcode INVOKEINTERFACE
Invoke interface method.
See Java Virtual Machine Specification:
6.5.invokeinterface invokeinterface
See Also:

INVOKEDYNAMIC

public static final Opcode INVOKEDYNAMIC
Invoke a dynamically-computed call site.
See Java Virtual Machine Specification:
6.5.invokedynamic invokedynamic
See Also:

NEW

public static final Opcode NEW
Create new object.
See Java Virtual Machine Specification:
6.5.new new
See Also:

NEWARRAY

public static final Opcode NEWARRAY
Create new array.
See Java Virtual Machine Specification:
6.5.newarray newarray
See Also:

ANEWARRAY

public static final Opcode ANEWARRAY
Create new array of reference.
See Java Virtual Machine Specification:
6.5.anewarray anewarray
See Also:

ARRAYLENGTH

public static final Opcode ARRAYLENGTH
Get length of array.
See Java Virtual Machine Specification:
6.5.arraylength arraylength
See Also:

ATHROW

public static final Opcode ATHROW
Throw exception or error.
See Java Virtual Machine Specification:
6.5.athrow athrow
See Also:

CHECKCAST

public static final Opcode CHECKCAST
Check whether object is of given type.
See Java Virtual Machine Specification:
6.5.checkcast checkcast
See Also:

INSTANCEOF

public static final Opcode INSTANCEOF
Determine if object is of given type.
See Java Virtual Machine Specification:
6.5.instanceof instanceof
See Also:

MONITORENTER

public static final Opcode MONITORENTER
Enter monitor for object.
See Java Virtual Machine Specification:
6.5.monitorenter monitorenter
See Also:

MONITOREXIT

public static final Opcode MONITOREXIT
Exit monitor for object.
See Java Virtual Machine Specification:
6.5.monitorexit monitorexit
See Also:

MULTIANEWARRAY

public static final Opcode MULTIANEWARRAY
Create new multidimensional array.
See Java Virtual Machine Specification:
6.5.multianewarray multianewarray
See Also:

IFNULL

public static final Opcode IFNULL
Branch if reference is null.
See Java Virtual Machine Specification:
6.5.ifnull ifnull
See Also:

IFNONNULL

public static final Opcode IFNONNULL
Branch if reference is not null.
See Java Virtual Machine Specification:
6.5.ifnonnull ifnonnull
See Also:

GOTO_W

public static final Opcode GOTO_W
Branch always (wide index).
See Java Virtual Machine Specification:
6.5.goto_w goto_w
See Also:

JSR_W

public static final Opcode JSR_W
(Discontinued) Jump subroutine (wide index); last used in major version 50.
See Java Virtual Machine Specification:
4.9.1 Static Constraints
6.5.jsr_w jsr_w
See Also:

ILOAD_W

public static final Opcode ILOAD_W
Load int from local variable (wide index). This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.iload iload
See Also:

LLOAD_W

public static final Opcode LLOAD_W
Load long from local variable (wide index). This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.lload lload
See Also:

FLOAD_W

public static final Opcode FLOAD_W
Load float from local variable (wide index). This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.fload fload
See Also:

DLOAD_W

public static final Opcode DLOAD_W
Load double from local variable (wide index). This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.dload dload
See Also:

ALOAD_W

public static final Opcode ALOAD_W
Load reference from local variable (wide index). This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.aload aload
See Also:

ISTORE_W

public static final Opcode ISTORE_W
Store int into local variable (wide index). This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.istore istore
See Also:

LSTORE_W

public static final Opcode LSTORE_W
Store long into local variable (wide index). This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.lstore lstore
See Also:

FSTORE_W

public static final Opcode FSTORE_W
Store float into local variable (wide index). This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.fstore fstore
See Also:

DSTORE_W

public static final Opcode DSTORE_W
Store double into local variable (wide index). This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.dstore dstore
See Also:

ASTORE_W

public static final Opcode ASTORE_W
Store reference into local variable (wide index). This is a wide-modified pseudo-opcode. Can also store the returnAddress type.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.astore astore
See Also:

RET_W

public static final Opcode RET_W
(Discontinued) Return from subroutine (wide index); last used in major version 50. This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
4.9.1 Static Constraints
6.5.wide wide
6.5.ret ret
See Also:

IINC_W

public static final Opcode IINC_W
Increment local variable by constant (wide index). This is a wide-modified pseudo-opcode.
See Java Virtual Machine Specification:
6.5.wide wide
6.5.iinc iinc
See Also:

Method Details

values

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

bytecode

public int bytecode()
Returns the opcode value. For wide pseudo-opcodes, returns the first 2 bytes of the instruction, which are the wide opcode 196 (0xC4) and the functional opcode, as a U2 value.
Returns:
the opcode value

isWide

public boolean isWide()
Returns true if this is a pseudo-opcode modified by wide opcode.

wide extends local variable index by additional bytes.

Returns:
true if this is a pseudo-opcode modified by wide opcode
See Java Virtual Machine Specification:
6.5.wide wide
See Also:

sizeIfFixed

public int sizeIfFixed()
Returns size of the instruction in bytes if fixed, or -1 otherwise. This size includes the opcode itself.
Returns:
size of the instruction in bytes if fixed, or -1 otherwise
See Also:

kind

public Opcode.Kind kind()
Returns operation kind. Each kind of operation has its own modeling interface to model instructions belonging to that kind.
Returns:
operation kind

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/Opcode.html