Enum Class Opcode
- All Implemented Interfaces:
Serializable
,Comparable<Opcode>
,Constable
-
Nested Class Summary
Nested classes/interfaces declared in class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionLoad reference from arrayStore into reference arrayPush nullLoad reference from local variableLoad reference from local variable 0Load reference from local variable 1Load reference from local variable 2Load reference from local variable 3Load reference from local variable (wide index)Create new array of referenceReturn reference from methodGet length of arrayStore reference into local variableStore reference into local variable 0Store reference into local variable 1Store reference into local variable 2Store reference into local variable 3Store reference into local variable (wide index)Throw exception or errorLoad byte from arrayStore into byte arrayPush byteLoad char from arrayStore into char arrayCheck whether object is of given typeConvert double to floatConvert double to intConvert double to longAdd doubleLoad double from arrayStore into double arrayCompare doubleCompare doublePush double constant 0Push double constant 1Divide doubleLoad double from local variableLoad double from local variable 0Load double from local variable 1Load double from local variable 2Load double from local variable 3Load double from local variable (wide index)Multiply doubleNegate doubleRemainder doubleReturn double from methodStore double into local variableStore double into local variable 0Store double into local variable 1Store double into local variable 2Store double into local variable 3Store double into local variable (wide index)Subtract doubleDuplicate the top operand stack valueDuplicate the top operand stack value and insert two values downDuplicate the top operand stack value and insert two or three values downDuplicate the top one or two operand stack valuesDuplicate the top one or two operand stack values and insert two or three values downDuplicate the top one or two operand stack values and insert two, three, or four values downConvert float to doubleConvert float to intConvert float to longAdd floatLoad float from arrayStore into float arrayCompare floatCompare floatPush float constant 0Push float constant 1Push float constant 2Divide floatLoad float from local variableLoad float from local variable 0Load float from local variable 1Load float from local variable 2Load float from local variable 3Load float from local variable (wide index)Multiply floatNegate floatRemainder floatReturn float from methodStore float into local variableStore float into local variable 0Store float into local variable 1Store float into local variable 2Store float into local variable 3Store float into local variable (wide index)Subtract floatFetch field from objectGet static field from classBranch alwaysBranch always (wide index)Convert int to byteConvert int to charConvert int to doubleConvert int to floatConvert int to longConvert int to shortAdd intLoad int from arrayBoolean AND intStore into int arrayPush int constant 0Push int constant 1Push int constant 2Push int constant 3Push int constant 4Push int constant 5Push int constant -1Divide intBranch if reference comparison succeedsBranch if reference comparison succeedsBranch if int comparison succeedsBranch if int comparison succeedsBranch if int comparison succeedsBranch if int comparison succeedsBranch if int comparison succeedsBranch if int comparison succeedsBranch if int comparison with zero succeedsBranch if int comparison with zero succeedsBranch if int comparison with zero succeedsBranch if int comparison with zero succeedsBranch if int comparison with zero succeedsBranch if int comparison with zero succeedsBranch if reference not nullBranch if reference is nullIncrement local variable by constantIncrement local variable by constant (wide index)Load int from local variableLoad int from local variable 0Load int from local variable 1Load int from local variable 2Load int from local variable3Load int from local variable (wide index)Multiply intNegate intDetermine if object is of given typeInvoke a dynamically-computed call siteInvoke interface methodInvoke instance method; direct invocation of instance initialization methods and methods of the current class and its supertypesInvoke a class (static) methodInvoke instance method; dispatch based on classBoolean OR intRemainder intReturn int from methodShift left intShift right intStore int into local variableStore int into local variable 0Store int into local variable 1Store int into local variable 2Store int into local variable 3Store int into local variable (wide index)Subtract intLogical shift right intBoolean XOR intJump subroutine is discontinued opcodeJump subroutine (wide index) is discontinued opcodeConvert long to doubleConvert long to floatConvert long to intAdd longLoad long from arrayBoolean AND longStore into long arrayCompare longPush long constant 0Push long constant 1Push item from run-time constant poolPush item from run-time constant pool (wide index)Push long or double from run-time constant pool (wide index)Divide longLoad long from local variableLoad long from local variable 0Load long from local variable 1Load long from local variable 2Load long from local variable 3Load long from local variable (wide index)Multiply longNegate longAccess jump table by key match and jumpBoolean OR longRemainder longReturn long from methodShift left longShift right longStore long into local variableStore long into local variable 0Store long into local variable 1Store long into local variable 2Store long into local variable 3Store long into local variable (wide index)Subtract longLogical shift right longBoolean XOR longEnter monitor for objectExit monitor for objectCreate new multidimensional arrayCreate new objectCreate new arrayDo nothingPop the top operand stack valuePop the top one or two operand stack valuesSet field in objectSet static field in classReturn from subroutine is discontinued opcodeReturn from subroutine (wide index) is discontinued opcodeReturn void from methodLoad short from arrayStore into short arrayPush shortSwap the top two operand stack valuesAccess jump table by index and jump -
Method Summary
Modifier and TypeMethodDescriptionint
bytecode()
Returns the opcode value.boolean
isWide()
Returns true if this is a pseudo-opcode modified by wide opcode.kind()
Returns instruction kind.int
Returns size of the instruction in bytes if fixed, or -1 otherwise.static Opcode
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.
-
Enum Constant Details
-
NOP
Do nothing -
ACONST_NULL
Push null -
ICONST_M1
Push int constant -1 -
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 -
LCONST_0
Push long constant 0 -
LCONST_1
Push long constant 1 -
FCONST_0
Push float constant 0 -
FCONST_1
Push float constant 1 -
FCONST_2
Push float constant 2 -
DCONST_0
Push double constant 0 -
DCONST_1
Push double constant 1 -
BIPUSH
Push byte -
SIPUSH
Push short -
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) -
ILOAD
Load int from local variable -
LLOAD
Load long from local variable -
FLOAD
Load float from local variable -
DLOAD
Load double from local variable -
ALOAD
Load reference from local variable -
ILOAD_0
Load int from local variable 0 -
ILOAD_1
Load int from local variable 1 -
ILOAD_2
Load int from local variable 2 -
ILOAD_3
Load int from local variable3 -
LLOAD_0
Load long from local variable 0 -
LLOAD_1
Load long from local variable 1 -
LLOAD_2
Load long from local variable 2 -
LLOAD_3
Load long from local variable 3 -
FLOAD_0
Load float from local variable 0 -
FLOAD_1
Load float from local variable 1 -
FLOAD_2
Load float from local variable 2 -
FLOAD_3
Load float from local variable 3 -
DLOAD_0
Load double from local variable 0 -
DLOAD_1
Load double from local variable 1 -
DLOAD_2
Load double from local variable 2 -
DLOAD_3
Load double from local variable 3 -
ALOAD_0
Load reference from local variable 0 -
ALOAD_1
Load reference from local variable 1 -
ALOAD_2
Load reference from local variable 2 -
ALOAD_3
Load reference from local variable 3 -
IALOAD
Load int from array -
LALOAD
Load long from array -
FALOAD
Load float from array -
DALOAD
Load double from array -
AALOAD
Load reference from array -
BALOAD
Load byte from array -
CALOAD
Load char from array -
SALOAD
Load short from array -
ISTORE
Store int into local variable -
LSTORE
Store long into local variable -
FSTORE
Store float into local variable -
DSTORE
Store double into local variable -
ASTORE
Store reference into local variable -
ISTORE_0
Store int into local variable 0 -
ISTORE_1
Store int into local variable 1 -
ISTORE_2
Store int into local variable 2 -
ISTORE_3
Store int into local variable 3 -
LSTORE_0
Store long into local variable 0 -
LSTORE_1
Store long into local variable 1 -
LSTORE_2
Store long into local variable 2 -
LSTORE_3
Store long into local variable 3 -
FSTORE_0
Store float into local variable 0 -
FSTORE_1
Store float into local variable 1 -
FSTORE_2
Store float into local variable 2 -
FSTORE_3
Store float into local variable 3 -
DSTORE_0
Store double into local variable 0 -
DSTORE_1
Store double into local variable 1 -
DSTORE_2
Store double into local variable 2 -
DSTORE_3
Store double into local variable 3 -
ASTORE_0
Store reference into local variable 0 -
ASTORE_1
Store reference into local variable 1 -
ASTORE_2
Store reference into local variable 2 -
ASTORE_3
Store reference into local variable 3 -
IASTORE
Store into int array -
LASTORE
Store into long array -
FASTORE
Store into float array -
DASTORE
Store into double array -
AASTORE
Store into reference array -
BASTORE
Store into byte array -
CASTORE
Store into char array -
SASTORE
Store into short array -
POP
Pop the top operand stack value -
POP2
Pop the top one or two operand stack values -
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 -
SWAP
Swap the top two operand stack values -
IADD
Add int -
LADD
Add long -
FADD
Add float -
DADD
Add double -
ISUB
Subtract int -
LSUB
Subtract long -
FSUB
Subtract float -
DSUB
Subtract double -
IMUL
Multiply int -
LMUL
Multiply long -
FMUL
Multiply float -
DMUL
Multiply double -
IDIV
Divide int -
LDIV
Divide long -
FDIV
Divide float -
DDIV
Divide double -
IREM
Remainder int -
LREM
Remainder long -
FREM
Remainder float -
DREM
Remainder double -
INEG
Negate int -
LNEG
Negate long -
FNEG
Negate float -
DNEG
Negate double -
ISHL
Shift left int -
LSHL
Shift left long -
ISHR
Shift right int -
LSHR
Shift right long -
IUSHR
Logical shift right int -
LUSHR
Logical shift right long -
IAND
Boolean AND int -
LAND
Boolean AND long -
IOR
Boolean OR int -
LOR
Boolean OR long -
IXOR
Boolean XOR int -
LXOR
Boolean XOR long -
IINC
Increment local variable by constant -
I2L
Convert int to long -
I2F
Convert int to float -
I2D
Convert int to double -
L2I
Convert long to int -
L2F
Convert long to float -
L2D
Convert long to double -
F2I
Convert float to int -
F2L
Convert float to long -
F2D
Convert float to double -
D2I
Convert double to int -
D2L
Convert double to long -
D2F
Convert double to float -
I2B
Convert int to byte -
I2C
Convert int to char -
I2S
Convert int to short -
LCMP
Compare long -
FCMPL
Compare float -
FCMPG
Compare float -
DCMPL
Compare double -
DCMPG
Compare double -
IFEQ
Branch if int comparison with zero succeeds -
IFNE
Branch if int comparison with zero succeeds -
IFLT
Branch if int comparison with zero succeeds -
IFGE
Branch if int comparison with zero succeeds -
IFGT
Branch if int comparison with zero succeeds -
IFLE
Branch if int comparison with zero succeeds -
IF_ICMPEQ
Branch if int comparison succeeds -
IF_ICMPNE
Branch if int comparison succeeds -
IF_ICMPLT
Branch if int comparison succeeds -
IF_ICMPGE
Branch if int comparison succeeds -
IF_ICMPGT
Branch if int comparison succeeds -
IF_ICMPLE
Branch if int comparison succeeds -
IF_ACMPEQ
Branch if reference comparison succeeds -
IF_ACMPNE
Branch if reference comparison succeeds -
GOTO
Branch always -
JSR
-
RET
-
TABLESWITCH
Access jump table by index and jump -
LOOKUPSWITCH
Access jump table by key match and jump -
IRETURN
Return int from method -
LRETURN
Return long from method -
FRETURN
Return float from method -
DRETURN
Return double from method -
ARETURN
Return reference from method -
RETURN
Return void from method -
GETSTATIC
Get static field from class -
PUTSTATIC
Set static field in class -
GETFIELD
Fetch field from object -
PUTFIELD
Set field in object -
INVOKEVIRTUAL
Invoke instance method; dispatch based on class -
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 -
INVOKEINTERFACE
Invoke interface method -
INVOKEDYNAMIC
Invoke a dynamically-computed call site -
NEW
Create new object -
NEWARRAY
Create new array -
ANEWARRAY
Create new array of reference -
ARRAYLENGTH
Get length of array -
ATHROW
Throw exception or error -
CHECKCAST
Check whether object is of given type -
INSTANCEOF
Determine if object is of given type -
MONITORENTER
Enter monitor for object -
MONITOREXIT
Exit monitor for object -
MULTIANEWARRAY
Create new multidimensional array -
IFNULL
Branch if reference is null -
IFNONNULL
Branch if reference not null -
GOTO_W
Branch always (wide index) -
JSR_W
-
ILOAD_W
Load int from local variable (wide index) -
LLOAD_W
Load long from local variable (wide index) -
FLOAD_W
Load float from local variable (wide index) -
DLOAD_W
Load double from local variable (wide index) -
ALOAD_W
Load reference from local variable (wide index) -
ISTORE_W
Store int into local variable (wide index) -
LSTORE_W
Store long into local variable (wide index) -
FSTORE_W
Store float into local variable (wide index) -
DSTORE_W
Store double into local variable (wide index) -
ASTORE_W
Store reference into local variable (wide index) -
RET_W
Return from subroutine (wide index) is discontinued opcode- See Also:
-
IINC_W
Increment local variable by constant (wide index)
-
-
Method Details
-
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
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 nameNullPointerException
- 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 opcode196
(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.- Returns:
- true if this is a pseudo-opcode modified by wide opcode
- 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
-
kind
-