org.cojen.classfile
Class Opcode
java.lang.Object
org.cojen.classfile.Opcode
public class Opcode
- extends Object
A collection of opcode constants for creating class file byte code. These
opcodes are defined in chapter 6 of
The Java Virual Machine Specification.
- Author:
- Brian S O'Neill
- See Also:
cojen.classfile.attribute.CodeAttr
Method Summary |
static boolean |
canThrowException(byte opcode)
Returns true if the given opcode can throw an exception at runtime. |
static String |
getMnemonic(byte opcode)
|
static byte |
reverseIfOpcode(byte opcode)
Reverses the condition for an "if" opcode. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOP
public static final byte NOP
- See Also:
- Constant Field Values
ACONST_NULL
public static final byte ACONST_NULL
- See Also:
- Constant Field Values
ICONST_M1
public static final byte ICONST_M1
- See Also:
- Constant Field Values
ICONST_0
public static final byte ICONST_0
- See Also:
- Constant Field Values
ICONST_1
public static final byte ICONST_1
- See Also:
- Constant Field Values
ICONST_2
public static final byte ICONST_2
- See Also:
- Constant Field Values
ICONST_3
public static final byte ICONST_3
- See Also:
- Constant Field Values
ICONST_4
public static final byte ICONST_4
- See Also:
- Constant Field Values
ICONST_5
public static final byte ICONST_5
- See Also:
- Constant Field Values
LCONST_0
public static final byte LCONST_0
- See Also:
- Constant Field Values
LCONST_1
public static final byte LCONST_1
- See Also:
- Constant Field Values
FCONST_0
public static final byte FCONST_0
- See Also:
- Constant Field Values
FCONST_1
public static final byte FCONST_1
- See Also:
- Constant Field Values
FCONST_2
public static final byte FCONST_2
- See Also:
- Constant Field Values
DCONST_0
public static final byte DCONST_0
- See Also:
- Constant Field Values
DCONST_1
public static final byte DCONST_1
- See Also:
- Constant Field Values
BIPUSH
public static final byte BIPUSH
- See Also:
- Constant Field Values
SIPUSH
public static final byte SIPUSH
- See Also:
- Constant Field Values
LDC
public static final byte LDC
- See Also:
- Constant Field Values
LDC_W
public static final byte LDC_W
- See Also:
- Constant Field Values
LDC2_W
public static final byte LDC2_W
- See Also:
- Constant Field Values
ILOAD
public static final byte ILOAD
- See Also:
- Constant Field Values
LLOAD
public static final byte LLOAD
- See Also:
- Constant Field Values
FLOAD
public static final byte FLOAD
- See Also:
- Constant Field Values
DLOAD
public static final byte DLOAD
- See Also:
- Constant Field Values
ALOAD
public static final byte ALOAD
- See Also:
- Constant Field Values
ILOAD_0
public static final byte ILOAD_0
- See Also:
- Constant Field Values
ILOAD_1
public static final byte ILOAD_1
- See Also:
- Constant Field Values
ILOAD_2
public static final byte ILOAD_2
- See Also:
- Constant Field Values
ILOAD_3
public static final byte ILOAD_3
- See Also:
- Constant Field Values
LLOAD_0
public static final byte LLOAD_0
- See Also:
- Constant Field Values
LLOAD_1
public static final byte LLOAD_1
- See Also:
- Constant Field Values
LLOAD_2
public static final byte LLOAD_2
- See Also:
- Constant Field Values
LLOAD_3
public static final byte LLOAD_3
- See Also:
- Constant Field Values
FLOAD_0
public static final byte FLOAD_0
- See Also:
- Constant Field Values
FLOAD_1
public static final byte FLOAD_1
- See Also:
- Constant Field Values
FLOAD_2
public static final byte FLOAD_2
- See Also:
- Constant Field Values
FLOAD_3
public static final byte FLOAD_3
- See Also:
- Constant Field Values
DLOAD_0
public static final byte DLOAD_0
- See Also:
- Constant Field Values
DLOAD_1
public static final byte DLOAD_1
- See Also:
- Constant Field Values
DLOAD_2
public static final byte DLOAD_2
- See Also:
- Constant Field Values
DLOAD_3
public static final byte DLOAD_3
- See Also:
- Constant Field Values
ALOAD_0
public static final byte ALOAD_0
- See Also:
- Constant Field Values
ALOAD_1
public static final byte ALOAD_1
- See Also:
- Constant Field Values
ALOAD_2
public static final byte ALOAD_2
- See Also:
- Constant Field Values
ALOAD_3
public static final byte ALOAD_3
- See Also:
- Constant Field Values
IALOAD
public static final byte IALOAD
- See Also:
- Constant Field Values
LALOAD
public static final byte LALOAD
- See Also:
- Constant Field Values
FALOAD
public static final byte FALOAD
- See Also:
- Constant Field Values
DALOAD
public static final byte DALOAD
- See Also:
- Constant Field Values
AALOAD
public static final byte AALOAD
- See Also:
- Constant Field Values
BALOAD
public static final byte BALOAD
- See Also:
- Constant Field Values
CALOAD
public static final byte CALOAD
- See Also:
- Constant Field Values
SALOAD
public static final byte SALOAD
- See Also:
- Constant Field Values
ISTORE
public static final byte ISTORE
- See Also:
- Constant Field Values
LSTORE
public static final byte LSTORE
- See Also:
- Constant Field Values
FSTORE
public static final byte FSTORE
- See Also:
- Constant Field Values
DSTORE
public static final byte DSTORE
- See Also:
- Constant Field Values
ASTORE
public static final byte ASTORE
- See Also:
- Constant Field Values
ISTORE_0
public static final byte ISTORE_0
- See Also:
- Constant Field Values
ISTORE_1
public static final byte ISTORE_1
- See Also:
- Constant Field Values
ISTORE_2
public static final byte ISTORE_2
- See Also:
- Constant Field Values
ISTORE_3
public static final byte ISTORE_3
- See Also:
- Constant Field Values
LSTORE_0
public static final byte LSTORE_0
- See Also:
- Constant Field Values
LSTORE_1
public static final byte LSTORE_1
- See Also:
- Constant Field Values
LSTORE_2
public static final byte LSTORE_2
- See Also:
- Constant Field Values
LSTORE_3
public static final byte LSTORE_3
- See Also:
- Constant Field Values
FSTORE_0
public static final byte FSTORE_0
- See Also:
- Constant Field Values
FSTORE_1
public static final byte FSTORE_1
- See Also:
- Constant Field Values
FSTORE_2
public static final byte FSTORE_2
- See Also:
- Constant Field Values
FSTORE_3
public static final byte FSTORE_3
- See Also:
- Constant Field Values
DSTORE_0
public static final byte DSTORE_0
- See Also:
- Constant Field Values
DSTORE_1
public static final byte DSTORE_1
- See Also:
- Constant Field Values
DSTORE_2
public static final byte DSTORE_2
- See Also:
- Constant Field Values
DSTORE_3
public static final byte DSTORE_3
- See Also:
- Constant Field Values
ASTORE_0
public static final byte ASTORE_0
- See Also:
- Constant Field Values
ASTORE_1
public static final byte ASTORE_1
- See Also:
- Constant Field Values
ASTORE_2
public static final byte ASTORE_2
- See Also:
- Constant Field Values
ASTORE_3
public static final byte ASTORE_3
- See Also:
- Constant Field Values
IASTORE
public static final byte IASTORE
- See Also:
- Constant Field Values
LASTORE
public static final byte LASTORE
- See Also:
- Constant Field Values
FASTORE
public static final byte FASTORE
- See Also:
- Constant Field Values
DASTORE
public static final byte DASTORE
- See Also:
- Constant Field Values
AASTORE
public static final byte AASTORE
- See Also:
- Constant Field Values
BASTORE
public static final byte BASTORE
- See Also:
- Constant Field Values
CASTORE
public static final byte CASTORE
- See Also:
- Constant Field Values
SASTORE
public static final byte SASTORE
- See Also:
- Constant Field Values
POP
public static final byte POP
- See Also:
- Constant Field Values
POP2
public static final byte POP2
- See Also:
- Constant Field Values
DUP
public static final byte DUP
- See Also:
- Constant Field Values
DUP_X1
public static final byte DUP_X1
- See Also:
- Constant Field Values
DUP_X2
public static final byte DUP_X2
- See Also:
- Constant Field Values
DUP2
public static final byte DUP2
- See Also:
- Constant Field Values
DUP2_X1
public static final byte DUP2_X1
- See Also:
- Constant Field Values
DUP2_X2
public static final byte DUP2_X2
- See Also:
- Constant Field Values
SWAP
public static final byte SWAP
- See Also:
- Constant Field Values
IADD
public static final byte IADD
- See Also:
- Constant Field Values
LADD
public static final byte LADD
- See Also:
- Constant Field Values
FADD
public static final byte FADD
- See Also:
- Constant Field Values
DADD
public static final byte DADD
- See Also:
- Constant Field Values
ISUB
public static final byte ISUB
- See Also:
- Constant Field Values
LSUB
public static final byte LSUB
- See Also:
- Constant Field Values
FSUB
public static final byte FSUB
- See Also:
- Constant Field Values
DSUB
public static final byte DSUB
- See Also:
- Constant Field Values
IMUL
public static final byte IMUL
- See Also:
- Constant Field Values
LMUL
public static final byte LMUL
- See Also:
- Constant Field Values
FMUL
public static final byte FMUL
- See Also:
- Constant Field Values
DMUL
public static final byte DMUL
- See Also:
- Constant Field Values
IDIV
public static final byte IDIV
- See Also:
- Constant Field Values
LDIV
public static final byte LDIV
- See Also:
- Constant Field Values
FDIV
public static final byte FDIV
- See Also:
- Constant Field Values
DDIV
public static final byte DDIV
- See Also:
- Constant Field Values
IREM
public static final byte IREM
- See Also:
- Constant Field Values
LREM
public static final byte LREM
- See Also:
- Constant Field Values
FREM
public static final byte FREM
- See Also:
- Constant Field Values
DREM
public static final byte DREM
- See Also:
- Constant Field Values
INEG
public static final byte INEG
- See Also:
- Constant Field Values
LNEG
public static final byte LNEG
- See Also:
- Constant Field Values
FNEG
public static final byte FNEG
- See Also:
- Constant Field Values
DNEG
public static final byte DNEG
- See Also:
- Constant Field Values
ISHL
public static final byte ISHL
- See Also:
- Constant Field Values
LSHL
public static final byte LSHL
- See Also:
- Constant Field Values
ISHR
public static final byte ISHR
- See Also:
- Constant Field Values
LSHR
public static final byte LSHR
- See Also:
- Constant Field Values
IUSHR
public static final byte IUSHR
- See Also:
- Constant Field Values
LUSHR
public static final byte LUSHR
- See Also:
- Constant Field Values
IAND
public static final byte IAND
- See Also:
- Constant Field Values
LAND
public static final byte LAND
- See Also:
- Constant Field Values
IOR
public static final byte IOR
- See Also:
- Constant Field Values
LOR
public static final byte LOR
- See Also:
- Constant Field Values
IXOR
public static final byte IXOR
- See Also:
- Constant Field Values
LXOR
public static final byte LXOR
- See Also:
- Constant Field Values
IINC
public static final byte IINC
- See Also:
- Constant Field Values
I2L
public static final byte I2L
- See Also:
- Constant Field Values
I2F
public static final byte I2F
- See Also:
- Constant Field Values
I2D
public static final byte I2D
- See Also:
- Constant Field Values
L2I
public static final byte L2I
- See Also:
- Constant Field Values
L2F
public static final byte L2F
- See Also:
- Constant Field Values
L2D
public static final byte L2D
- See Also:
- Constant Field Values
F2I
public static final byte F2I
- See Also:
- Constant Field Values
F2L
public static final byte F2L
- See Also:
- Constant Field Values
F2D
public static final byte F2D
- See Also:
- Constant Field Values
D2I
public static final byte D2I
- See Also:
- Constant Field Values
D2L
public static final byte D2L
- See Also:
- Constant Field Values
D2F
public static final byte D2F
- See Also:
- Constant Field Values
I2B
public static final byte I2B
- See Also:
- Constant Field Values
I2C
public static final byte I2C
- See Also:
- Constant Field Values
I2S
public static final byte I2S
- See Also:
- Constant Field Values
LCMP
public static final byte LCMP
- See Also:
- Constant Field Values
FCMPL
public static final byte FCMPL
- See Also:
- Constant Field Values
FCMPG
public static final byte FCMPG
- See Also:
- Constant Field Values
DCMPL
public static final byte DCMPL
- See Also:
- Constant Field Values
DCMPG
public static final byte DCMPG
- See Also:
- Constant Field Values
IFEQ
public static final byte IFEQ
- See Also:
- Constant Field Values
IFNE
public static final byte IFNE
- See Also:
- Constant Field Values
IFLT
public static final byte IFLT
- See Also:
- Constant Field Values
IFGE
public static final byte IFGE
- See Also:
- Constant Field Values
IFGT
public static final byte IFGT
- See Also:
- Constant Field Values
IFLE
public static final byte IFLE
- See Also:
- Constant Field Values
IF_ICMPEQ
public static final byte IF_ICMPEQ
- See Also:
- Constant Field Values
IF_ICMPNE
public static final byte IF_ICMPNE
- See Also:
- Constant Field Values
IF_ICMPLT
public static final byte IF_ICMPLT
- See Also:
- Constant Field Values
IF_ICMPGE
public static final byte IF_ICMPGE
- See Also:
- Constant Field Values
IF_ICMPGT
public static final byte IF_ICMPGT
- See Also:
- Constant Field Values
IF_ICMPLE
public static final byte IF_ICMPLE
- See Also:
- Constant Field Values
IF_ACMPEQ
public static final byte IF_ACMPEQ
- See Also:
- Constant Field Values
IF_ACMPNE
public static final byte IF_ACMPNE
- See Also:
- Constant Field Values
GOTO
public static final byte GOTO
- See Also:
- Constant Field Values
JSR
public static final byte JSR
- See Also:
- Constant Field Values
RET
public static final byte RET
- See Also:
- Constant Field Values
TABLESWITCH
public static final byte TABLESWITCH
- See Also:
- Constant Field Values
LOOKUPSWITCH
public static final byte LOOKUPSWITCH
- See Also:
- Constant Field Values
IRETURN
public static final byte IRETURN
- See Also:
- Constant Field Values
LRETURN
public static final byte LRETURN
- See Also:
- Constant Field Values
FRETURN
public static final byte FRETURN
- See Also:
- Constant Field Values
DRETURN
public static final byte DRETURN
- See Also:
- Constant Field Values
ARETURN
public static final byte ARETURN
- See Also:
- Constant Field Values
RETURN
public static final byte RETURN
- See Also:
- Constant Field Values
GETSTATIC
public static final byte GETSTATIC
- See Also:
- Constant Field Values
PUTSTATIC
public static final byte PUTSTATIC
- See Also:
- Constant Field Values
GETFIELD
public static final byte GETFIELD
- See Also:
- Constant Field Values
PUTFIELD
public static final byte PUTFIELD
- See Also:
- Constant Field Values
INVOKEVIRTUAL
public static final byte INVOKEVIRTUAL
- See Also:
- Constant Field Values
INVOKESPECIAL
public static final byte INVOKESPECIAL
- See Also:
- Constant Field Values
INVOKESTATIC
public static final byte INVOKESTATIC
- See Also:
- Constant Field Values
INVOKEINTERFACE
public static final byte INVOKEINTERFACE
- See Also:
- Constant Field Values
UNUSED
public static final byte UNUSED
- See Also:
- Constant Field Values
NEW
public static final byte NEW
- See Also:
- Constant Field Values
NEWARRAY
public static final byte NEWARRAY
- See Also:
- Constant Field Values
ANEWARRAY
public static final byte ANEWARRAY
- See Also:
- Constant Field Values
ARRAYLENGTH
public static final byte ARRAYLENGTH
- See Also:
- Constant Field Values
ATHROW
public static final byte ATHROW
- See Also:
- Constant Field Values
CHECKCAST
public static final byte CHECKCAST
- See Also:
- Constant Field Values
INSTANCEOF
public static final byte INSTANCEOF
- See Also:
- Constant Field Values
MONITORENTER
public static final byte MONITORENTER
- See Also:
- Constant Field Values
MONITOREXIT
public static final byte MONITOREXIT
- See Also:
- Constant Field Values
WIDE
public static final byte WIDE
- See Also:
- Constant Field Values
MULTIANEWARRAY
public static final byte MULTIANEWARRAY
- See Also:
- Constant Field Values
IFNULL
public static final byte IFNULL
- See Also:
- Constant Field Values
IFNONNULL
public static final byte IFNONNULL
- See Also:
- Constant Field Values
GOTO_W
public static final byte GOTO_W
- See Also:
- Constant Field Values
JSR_W
public static final byte JSR_W
- See Also:
- Constant Field Values
BREAKPOINT
public static final byte BREAKPOINT
- See Also:
- Constant Field Values
Opcode
public Opcode()
getMnemonic
public static final String getMnemonic(byte opcode)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
- if opcode is invalid
reverseIfOpcode
public static final byte reverseIfOpcode(byte opcode)
- Reverses the condition for an "if" opcode. For example, IFEQ is changed
to IFNE.
canThrowException
public static final boolean canThrowException(byte opcode)
- Returns true if the given opcode can throw an exception at runtime.
Copyright © 2004-2011 Brian S O'Neill. All Rights Reserved.