Enum Class Opcode
- All Implemented Interfaces:
Serializable, Comparable<Opcode>, Constable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLoadreferencefrom array.Store intoreferencearray.Pushnull.Loadreferencefrom local variable.Loadreferencefrom local variable slot0.Loadreferencefrom local variable slot1.Loadreferencefrom local variable slot2.Loadreferencefrom local variable slot3.Loadreferencefrom local variable (wide index).Create new array ofreference.Returnreferencefrom method.Get length of array.Storereferenceinto local variable.Storereferenceinto local variable slot0.Storereferenceinto local variable slot1.Storereferenceinto local variable slot2.Storereferenceinto local variable slot3.Storereferenceinto local variable (wide index).Throw exception or error.Loadcharfrom array.Store intochararray.Check whether object is of given type.Adddouble.Loaddoublefrom array.Store intodoublearray.Comparedouble.Comparedouble.Pushdoubleconstant0.0D.Pushdoubleconstant1.0D.Dividedouble.Loaddoublefrom local variable.Loaddoublefrom local variable slot0.Loaddoublefrom local variable slot1.Loaddoublefrom local variable slot2.Loaddoublefrom local variable slot3.Loaddoublefrom local variable (wide index).Multiplydouble.Negatedouble.Remainderdouble.Returndoublefrom method.Storedoubleinto local variable.Storedoubleinto local variable slot0.Storedoubleinto local variable slot1.Storedoubleinto local variable slot2.Storedoubleinto local variable slot3.Storedoubleinto local variable (wide index).Subtractdouble.Duplicate the top operand stack value.Duplicate the top operand stack value and insert two values down.Duplicate the top operand stack value and insert two or three values down.Duplicate the top one or two operand stack values.Duplicate the top one or two operand stack values and insert two or three values down.Duplicate the top one or two operand stack values and insert two, three, or four values down.Addfloat.Loadfloatfrom array.Store intofloatarray.Comparefloat.Comparefloat.Pushfloatconstant0.0F.Pushfloatconstant1.0F.Pushfloatconstant2.0F.Dividefloat.Loadfloatfrom local variable.Loadfloatfrom local variable slot0.Loadfloatfrom local variable slot1.Loadfloatfrom local variable slot2.Loadfloatfrom local variable slot3.Loadfloatfrom local variable (wide index).Multiplyfloat.Negatefloat.Remainderfloat.Returnfloatfrom method.Storefloatinto local variable.Storefloatinto local variable slot0.Storefloatinto local variable slot1.Storefloatinto local variable slot2.Storefloatinto local variable slot3.Storefloatinto local variable (wide index).Subtractfloat.Fetch field from object.Getstaticfield from class.Branch always.Branch always (wide index).Addint.Loadintfrom array.Bitwise ANDint.Store intointarray.Pushintconstant0.Pushintconstant1.Pushintconstant2.Pushintconstant3.Pushintconstant4.Pushintconstant5.Pushintconstant-1.Divideint.Branch ifreferencecomparisonoperand1 == operand2succeeds.Branch ifreferencecomparisonoperand1 != operand2succeeds.Branch ifintcomparisonoperand1 == operand2succeeds.Branch ifintcomparisonoperand1 >= operand2succeeds.Branch ifintcomparisonoperand1 > operand2succeeds.Branch ifintcomparisonoperand1 <= operand2succeeds.Branch ifintcomparisonoperand1 < operand2succeeds.Branch ifintcomparisonoperand1 != operand2succeeds.Branch ifintcomparison== 0succeeds.Branch ifintcomparison>= 0succeeds.Branch ifintcomparison> 0succeeds.Branch ifintcomparison<= 0succeeds.Branch ifintcomparison< 0succeeds.Branch ifintcomparison!= 0succeeds.Branch ifreferenceis notnull.Branch ifreferenceisnull.Incrementintlocal variable by constant.Increment local variable by constant (wide index).Loadintfrom local variable.Loadintfrom local variable slot0.Loadintfrom local variable slot1.Loadintfrom local variable slot2.Loadintfrom local variable slot3.Loadintfrom local variable (wide index).Multiplyint.Negateint.Determine if object is of given type.Invoke a dynamically-computed call site.Invoke interface method.Invoke instance method; direct invocation of instance initialization methods and methods of the current class and its supertypes.Invoke a class (static) method.Invoke instance method; dispatch based on class.Bitwise ORint.Remainderint.Returnintfrom method.Shift leftint.Arithmetic shift rightint.Storeintinto local variable.Storeintinto local variable slot0.Storeintinto local variable slot1.Storeintinto local variable slot2.Storeintinto local variable slot3.Storeintinto local variable (wide index).Subtractint.Logical shift rightint.Bitwise XORint.(Discontinued) Jump subroutine; last used in major version 50.(Discontinued) Jump subroutine (wide index); last used in major version 50.Addlong.Loadlongfrom array.Bitwise ANDlong.Store intolongarray.Comparelong.Pushlongconstant0L.Pushlongconstant1L.Push item from run-time constant pool.Push item from run-time constant pool (wide index).Dividelong.Loadlongfrom local variable.Loadlongfrom local variable slot0.Loadlongfrom local variable slot1.Loadlongfrom local variable slot2.Loadlongfrom local variable slot3.Loadlongfrom local variable (wide index).Multiplylong.Negatelong.Access jump table by key match and jump.Bitwise ORlong.Remainderlong.Returnlongfrom method.Shift leftlong.Arithmetic shift rightlong.Storelonginto local variable.Storelonginto local variable slot0.Storelonginto local variable slot1.Storelonginto local variable slot2.Storelonginto local variable slot3.Storelonginto local variable (wide index).Subtractlong.Logical shift rightlong.Bitwise XORlong.Enter monitor for object.Exit monitor for object.Create new multidimensional array.Create new object.Create new array.Do nothing.Pop the top operand stack value.Pop the top one or two operand stack values.Set field in object.Setstaticfield in class.(Discontinued) Return from subroutine; last used in major version 50.(Discontinued) Return from subroutine (wide index); last used in major version 50.Returnvoidfrom method.Loadshortfrom array.Store intoshortarray.Swap the top two operand stack values.Access jump table by index and jump. -
Method Summary
Modifier and TypeMethodDescriptionintbytecode()Returns the opcode value.booleanisWide()Returns true if this is a pseudo-opcode modified by wide opcode.kind()Returns operation kind.intReturns size of the instruction in bytes if fixed, or -1 otherwise.static OpcodeReturns 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
-
ACONST_NULL
-
ICONST_M1
-
ICONST_0
-
ICONST_1
-
ICONST_2
-
ICONST_3
-
ICONST_4
-
ICONST_5
-
LCONST_0
-
LCONST_1
-
FCONST_0
-
FCONST_1
-
FCONST_2
-
DCONST_0
-
DCONST_1
-
BIPUSH
-
SIPUSH
-
LDC
-
LDC_W
-
LDC2_W
-
ILOAD
-
LLOAD
-
FLOAD
-
DLOAD
-
ALOAD
-
ILOAD_0
-
ILOAD_1
-
ILOAD_2
-
ILOAD_3
-
LLOAD_0
-
LLOAD_1
-
LLOAD_2
-
LLOAD_3
-
FLOAD_0
-
FLOAD_1
-
FLOAD_2
-
FLOAD_3
-
DLOAD_0
-
DLOAD_1
-
DLOAD_2
-
DLOAD_3
-
ALOAD_0
-
ALOAD_1
-
ALOAD_2
-
ALOAD_3
-
IALOAD
-
LALOAD
-
FALOAD
-
DALOAD
-
AALOAD
-
BALOAD
-
CALOAD
-
SALOAD
-
ISTORE
-
LSTORE
-
FSTORE
-
DSTORE
-
ASTORE
Storereferenceinto local variable. Can also store thereturnAddresstype.- See Also:
-
ISTORE_0
-
ISTORE_1
-
ISTORE_2
-
ISTORE_3
-
LSTORE_0
-
LSTORE_1
-
LSTORE_2
-
LSTORE_3
-
FSTORE_0
-
FSTORE_1
-
FSTORE_2
-
FSTORE_3
-
DSTORE_0
-
DSTORE_1
-
DSTORE_2
-
DSTORE_3
-
ASTORE_0
- See Also:
-
ASTORE_1
- See Also:
-
ASTORE_2
- See Also:
-
ASTORE_3
- See Also:
-
IASTORE
-
LASTORE
-
FASTORE
-
DASTORE
-
AASTORE
-
BASTORE
-
CASTORE
-
SASTORE
-
POP
-
POP2
-
DUP
-
DUP_X1
Duplicate the top operand stack value and insert two values down.- See Also:
-
DUP_X2
Duplicate the top operand stack value and insert two or three values down.- See Also:
-
DUP2
-
DUP2_X1
Duplicate the top one or two operand stack values and insert two or three values down.- See Also:
-
DUP2_X2
Duplicate the top one or two operand stack values and insert two, three, or four values down.- See Also:
-
SWAP
-
IADD
-
LADD
-
FADD
-
DADD
-
ISUB
-
LSUB
-
FSUB
-
DSUB
-
IMUL
-
LMUL
-
FMUL
-
DMUL
-
IDIV
-
LDIV
-
FDIV
-
DDIV
-
IREM
-
LREM
-
FREM
-
DREM
-
INEG
-
LNEG
-
FNEG
-
DNEG
-
ISHL
-
LSHL
-
ISHR
-
LSHR
-
IUSHR
-
LUSHR
-
IAND
-
LAND
-
IOR
-
LOR
-
IXOR
-
LXOR
-
IINC
-
I2L
-
I2F
-
I2D
-
L2I
-
L2F
-
L2D
-
F2I
-
F2L
-
F2D
-
D2I
-
D2L
-
D2F
-
I2B
- See Also:
-
I2C
- See Also:
-
I2S
- See Also:
-
LCMP
-
FCMPL
-
FCMPG
-
DCMPL
-
DCMPG
-
IFEQ
-
IFNE
-
IFLT
-
IFGE
-
IFGT
-
IFLE
-
IF_ICMPEQ
-
IF_ICMPNE
-
IF_ICMPLT
-
IF_ICMPGE
-
IF_ICMPGT
-
IF_ICMPLE
-
IF_ACMPEQ
-
IF_ACMPNE
-
GOTO
-
JSR
-
RET
-
TABLESWITCH
-
LOOKUPSWITCH
-
IRETURN
-
LRETURN
-
FRETURN
-
DRETURN
-
ARETURN
-
RETURN
-
GETSTATIC
-
PUTSTATIC
-
GETFIELD
-
PUTFIELD
-
INVOKEVIRTUAL
-
INVOKESPECIAL
Invoke instance method; direct invocation of instance initialization methods and methods of the current class and its supertypes.- See Also:
-
INVOKESTATIC
-
INVOKEINTERFACE
-
INVOKEDYNAMIC
-
NEW
-
NEWARRAY
-
ANEWARRAY
-
ARRAYLENGTH
-
ATHROW
-
CHECKCAST
-
INSTANCEOF
-
MONITORENTER
-
MONITOREXIT
-
MULTIANEWARRAY
-
IFNULL
-
IFNONNULL
-
GOTO_W
-
JSR_W
-
ILOAD_W
-
LLOAD_W
-
FLOAD_W
-
DLOAD_W
-
ALOAD_W
-
ISTORE_W
-
LSTORE_W
-
FSTORE_W
-
DSTORE_W
-
ASTORE_W
Storereferenceinto local variable (wide index). This is a wide-modified pseudo-opcode. Can also store thereturnAddresstype.- See Also:
-
RET_W
-
IINC_W
-
-
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.wideextends local variable index by additional bytes.- 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
- See Also:
-
kind
Returns operation kind. Each kind of operation has its own modeling interface to model instructions belonging to that kind.- Returns:
- operation kind
-