Serializable, Comparable<Opcode>, Constablepublic enum Opcode extends Enum<Opcode>
wide. An opcode describes the operation of an instruction.
_W suffix. However, ldc_w, ldc2_w, goto_w, and jsr_w are legitimate opcodes instead of wide pseudo-opcodes.| Modifier and Type | Class | Description |
|---|---|---|
static enum |
Opcode.Kind |
Kinds of opcodes. |
Enum.EnumDesc<E>
| 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 |
|
BASTORE |
|
BIPUSH |
|
CALOAD |
Load char from array. |
CASTORE |
Store into char array. |
CHECKCAST |
Check whether object is of given type. |
D2F |
|
D2I |
|
D2L |
|
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 |
|
F2I |
|
F2L |
|
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 |
|
I2C |
|
I2D |
|
I2F |
|
I2L |
|
I2S |
|
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 |
|
L2F |
|
L2I |
|
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 |
|
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 |
|
SWAP |
Swap the top two operand stack values. |
TABLESWITCH |
Access jump table by index and jump. |
| 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 |
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. |
public static final Opcode NOP
public static final Opcode ACONST_NULL
null.public static final Opcode ICONST_M1
int constant -1.public static final Opcode ICONST_0
int constant 0.public static final Opcode ICONST_1
int constant 1.public static final Opcode ICONST_2
int constant 2.public static final Opcode ICONST_3
int constant 3.public static final Opcode ICONST_4
int constant 4.public static final Opcode ICONST_5
int constant 5.public static final Opcode LCONST_0
long constant 0L.public static final Opcode LCONST_1
long constant 1L.public static final Opcode FCONST_0
float constant 0.0F.public static final Opcode FCONST_1
float constant 1.0F.public static final Opcode FCONST_2
float constant 2.0F.public static final Opcode DCONST_0
double constant 0.0D.public static final Opcode DCONST_1
double constant 1.0D.public static final Opcode BIPUSH
public static final Opcode SIPUSH
public static final Opcode LDC
public static final Opcode LDC_W
public static final Opcode LDC2_W
public static final Opcode ILOAD
int from local variable.public static final Opcode LLOAD
long from local variable.public static final Opcode FLOAD
float from local variable.public static final Opcode DLOAD
double from local variable.public static final Opcode ALOAD
reference from local variable.public static final Opcode ILOAD_0
int from local variable slot 0.public static final Opcode ILOAD_1
int from local variable slot 1.public static final Opcode ILOAD_2
int from local variable slot 2.public static final Opcode ILOAD_3
int from local variable slot 3.public static final Opcode LLOAD_0
long from local variable slot 0.public static final Opcode LLOAD_1
long from local variable slot 1.public static final Opcode LLOAD_2
long from local variable slot 2.public static final Opcode LLOAD_3
long from local variable slot 3.public static final Opcode FLOAD_0
float from local variable slot 0.public static final Opcode FLOAD_1
float from local variable slot 1.public static final Opcode FLOAD_2
float from local variable slot 2.public static final Opcode FLOAD_3
float from local variable slot 3.public static final Opcode DLOAD_0
double from local variable slot 0.public static final Opcode DLOAD_1
double from local variable slot 1.public static final Opcode DLOAD_2
double from local variable slot 2.public static final Opcode DLOAD_3
double from local variable slot 3.public static final Opcode ALOAD_0
reference from local variable slot 0.public static final Opcode ALOAD_1
reference from local variable slot 1.public static final Opcode ALOAD_2
reference from local variable slot 2.public static final Opcode ALOAD_3
reference from local variable slot 3.public static final Opcode IALOAD
int from array.public static final Opcode LALOAD
long from array.public static final Opcode FALOAD
float from array.public static final Opcode DALOAD
double from array.public static final Opcode AALOAD
reference from array.public static final Opcode BALOAD
public static final Opcode CALOAD
char from array.public static final Opcode SALOAD
short from array.public static final Opcode ISTORE
int into local variable.public static final Opcode LSTORE
long into local variable.public static final Opcode FSTORE
float into local variable.public static final Opcode DSTORE
double into local variable.public static final Opcode ASTORE
reference into local variable. Can also store the returnAddress type.public static final Opcode ISTORE_0
int into local variable slot 0.public static final Opcode ISTORE_1
int into local variable slot 1.public static final Opcode ISTORE_2
int into local variable slot 2.public static final Opcode ISTORE_3
int into local variable slot 3.public static final Opcode LSTORE_0
long into local variable slot 0.public static final Opcode LSTORE_1
long into local variable slot 1.public static final Opcode LSTORE_2
long into local variable slot 2.public static final Opcode LSTORE_3
long into local variable slot 3.public static final Opcode FSTORE_0
float into local variable slot 0.public static final Opcode FSTORE_1
float into local variable slot 1.public static final Opcode FSTORE_2
float into local variable slot 2.public static final Opcode FSTORE_3
float into local variable slot 3.public static final Opcode DSTORE_0
double into local variable slot 0.public static final Opcode DSTORE_1
double into local variable slot 1.public static final Opcode DSTORE_2
double into local variable slot 2.public static final Opcode DSTORE_3
double into local variable slot 3.public static final Opcode ASTORE_0
public static final Opcode ASTORE_1
public static final Opcode ASTORE_2
public static final Opcode ASTORE_3
public static final Opcode IASTORE
int array.public static final Opcode LASTORE
long array.public static final Opcode FASTORE
float array.public static final Opcode DASTORE
double array.public static final Opcode AASTORE
reference array.public static final Opcode BASTORE
public static final Opcode CASTORE
char array.public static final Opcode SASTORE
short array.public static final Opcode POP
public static final Opcode POP2
public static final Opcode DUP
public static final Opcode DUP_X1
public static final Opcode DUP_X2
public static final Opcode DUP2
public static final Opcode DUP2_X1
public static final Opcode DUP2_X2
public static final Opcode SWAP
public static final Opcode IADD
int.public static final Opcode LADD
long.public static final Opcode FADD
float.public static final Opcode DADD
double.public static final Opcode ISUB
int.public static final Opcode LSUB
long.public static final Opcode FSUB
float.public static final Opcode DSUB
double.public static final Opcode IMUL
int.public static final Opcode LMUL
long.public static final Opcode FMUL
float.public static final Opcode DMUL
double.public static final Opcode IDIV
int.public static final Opcode LDIV
long.public static final Opcode FDIV
float.public static final Opcode DDIV
double.public static final Opcode IREM
int.public static final Opcode LREM
long.public static final Opcode FREM
float.public static final Opcode DREM
double.public static final Opcode INEG
int.public static final Opcode LNEG
long.public static final Opcode FNEG
float.public static final Opcode DNEG
double.public static final Opcode ISHL
int.public static final Opcode LSHL
long.public static final Opcode ISHR
int.public static final Opcode LSHR
long.public static final Opcode IUSHR
int.public static final Opcode LUSHR
long.public static final Opcode IAND
int.boolean AND.public static final Opcode LAND
long.public static final Opcode IOR
int.boolean OR.public static final Opcode LOR
long.public static final Opcode IXOR
int.boolean XOR.public static final Opcode LXOR
long.public static final Opcode IINC
int local variable by constant.public static final Opcode I2L
public static final Opcode I2F
public static final Opcode I2D
public static final Opcode L2I
public static final Opcode L2F
public static final Opcode L2D
public static final Opcode F2I
public static final Opcode F2L
public static final Opcode F2D
public static final Opcode D2I
public static final Opcode D2L
public static final Opcode D2F
public static final Opcode I2B
public static final Opcode I2C
public static final Opcode I2S
public static final Opcode LCMP
long.public static final Opcode FCMPL
public static final Opcode FCMPG
public static final Opcode DCMPL
public static final Opcode DCMPG
public static final Opcode IFEQ
int comparison == 0 succeeds.public static final Opcode IFNE
int comparison != 0 succeeds.public static final Opcode IFLT
int comparison < 0 succeeds.public static final Opcode IFGE
int comparison >= 0 succeeds.public static final Opcode IFGT
int comparison > 0 succeeds.public static final Opcode IFLE
int comparison <= 0 succeeds.public static final Opcode IF_ICMPEQ
int comparison operand1 == operand2 succeeds.public static final Opcode IF_ICMPNE
int comparison operand1 != operand2 succeeds.public static final Opcode IF_ICMPLT
int comparison operand1 < operand2 succeeds.public static final Opcode IF_ICMPGE
int comparison operand1 >= operand2 succeeds.public static final Opcode IF_ICMPGT
int comparison operand1 > operand2 succeeds.public static final Opcode IF_ICMPLE
int comparison operand1 <= operand2 succeeds.public static final Opcode IF_ACMPEQ
reference comparison operand1 == operand2 succeeds.public static final Opcode IF_ACMPNE
reference comparison operand1 != operand2 succeeds.public static final Opcode GOTO
public static final Opcode JSR
public static final Opcode RET
public static final Opcode TABLESWITCH
public static final Opcode LOOKUPSWITCH
public static final Opcode IRETURN
int from method.public static final Opcode LRETURN
long from method.public static final Opcode FRETURN
float from method.public static final Opcode DRETURN
double from method.public static final Opcode ARETURN
reference from method.public static final Opcode RETURN
void from method.public static final Opcode GETSTATIC
static field from class.public static final Opcode PUTSTATIC
static field in class.public static final Opcode GETFIELD
public static final Opcode PUTFIELD
public static final Opcode INVOKEVIRTUAL
public static final Opcode INVOKESPECIAL
public static final Opcode INVOKESTATIC
static) method.public static final Opcode INVOKEINTERFACE
public static final Opcode INVOKEDYNAMIC
public static final Opcode NEW
public static final Opcode NEWARRAY
public static final Opcode ANEWARRAY
reference.public static final Opcode ARRAYLENGTH
public static final Opcode ATHROW
public static final Opcode CHECKCAST
public static final Opcode INSTANCEOF
public static final Opcode MONITORENTER
public static final Opcode MONITOREXIT
public static final Opcode MULTIANEWARRAY
public static final Opcode IFNULL
reference is null.public static final Opcode IFNONNULL
reference is not null.public static final Opcode GOTO_W
public static final Opcode JSR_W
public static final Opcode ILOAD_W
public static final Opcode LLOAD_W
public static final Opcode FLOAD_W
public static final Opcode DLOAD_W
public static final Opcode ALOAD_W
public static final Opcode ISTORE_W
public static final Opcode LSTORE_W
public static final Opcode FSTORE_W
public static final Opcode DSTORE_W
public static final Opcode ASTORE_W
reference into local variable (wide index). This is a wide-modified pseudo-opcode. Can also store the returnAddress type.public static final Opcode RET_W
public static final Opcode IINC_W
public static Opcode[] values()
public static Opcode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum class has no constant with the specified nameNullPointerException - if the argument is nullpublic int bytecode()
196 (0xC4) and the functional opcode, as a U2 value.public boolean isWide()
wide extends local variable index by additional bytes.
public int sizeIfFixed()
public Opcode.Kind 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