|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjasm.lang.Bytecode
public abstract class Bytecode
Nested Class Summary | |
---|---|
static class |
Bytecode.ArrayLength
Represents the arraylength bytecode |
static class |
Bytecode.ArrayLoad
Represents the arrayload bytecode. |
static class |
Bytecode.ArrayStore
Represents the arraystore bytecode. |
static class |
Bytecode.BinOp
This represents all binary operators involving two operands on the stack. |
static class |
Bytecode.Branch
This class abstracts different kinds of branching statements (e.g. |
static class |
Bytecode.CheckCast
Represents the check cast bytecode. |
static class |
Bytecode.Cmp
This represents the bytecodes fcmpl, fcmpg, dcmpl, dcmpg and lcmp |
static class |
Bytecode.Conversion
This represents the family of primitive conversion operations, such as i2f, d2f, l2i etc. |
static class |
Bytecode.Dup
Represents the dup and dup2 bytecodes |
static class |
Bytecode.DupX1
Represents the dupx1 bytecode |
static class |
Bytecode.DupX2
Represents the dupx2 bytecode |
static class |
Bytecode.FieldMode
|
static class |
Bytecode.GetField
This represents the getfield and getstatic bytecodes. |
static class |
Bytecode.Goto
This class abstracts the unconditional branch bytecode goto. |
static class |
Bytecode.If
This represents the bytecodes ifeq, ifne, iflt, ifge, ifgt, ifle. |
static class |
Bytecode.IfCmp
This represents the bytecodes ifacmp_XX and ificmp_xx |
static class |
Bytecode.IfMode
|
static class |
Bytecode.Iinc
Represents the iinc bytecode for incrementing a local variable. |
static class |
Bytecode.InstanceOf
Represents the instanceof bytecode |
static class |
Bytecode.Invoke
This represents the invokevirtual, invokespecial, invokestatic and invokeinterface bytecodes |
static class |
Bytecode.InvokeMode
|
static class |
Bytecode.Label
This does not actually correspond to a bytecode per se. |
static class |
Bytecode.Load
Represents all bytecodes for loading from a local variable, including iload, aload, lload etc. |
static class |
Bytecode.LoadConst
Represents all bytecodes for loading constants. |
static class |
Bytecode.MonitorEnter
Represents a monitorenter bytecode |
static class |
Bytecode.MonitorExit
Represents a monitorexit bytecode |
static class |
Bytecode.Neg
|
static class |
Bytecode.New
Represents the new, newarray and anewarray, multinewarray bytecodes. |
static class |
Bytecode.Nop
Represents the nop bytecode. |
static class |
Bytecode.Pop
Represents the pop and pop2 bytecodes |
static class |
Bytecode.PutField
This represents the putfield and putstatic bytecodes. |
static class |
Bytecode.Return
Represents return bytecodes, including ireturn, areturn, etc. |
static class |
Bytecode.Store
Represents all bytecodes for storing to a local variable, including istore, astore, lstore etc. |
static class |
Bytecode.Swap
Represents the swap bytecode |
static class |
Bytecode.Switch
This represents the bytecodes tableswitch and lookupswitch |
static class |
Bytecode.Throw
Represents the athrow bytecode. |
Field Summary | |
---|---|
static int |
AALOAD
|
static int |
AASTORE
|
static int |
ACONST_NULL
|
static int |
ALOAD
|
static int |
ALOAD_0
|
static int |
ALOAD_1
|
static int |
ALOAD_2
|
static int |
ALOAD_3
|
static int |
ANEWARRAY
|
static int |
ARETURN
|
static int |
ARRAYLENGTH
|
static int |
ASTORE
|
static int |
ASTORE_0
|
static int |
ASTORE_1
|
static int |
ASTORE_2
|
static int |
ASTORE_3
|
static int |
ATHROW
|
static int |
BALOAD
|
static int |
BASTORE
|
static int |
BIPUSH
|
static int |
BREAKPOINT
|
static int |
CALOAD
|
static int |
CASTORE
|
static int |
CHECKCAST
|
static int |
D2F
|
static int |
D2I
|
static int |
D2L
|
static int |
DADD
|
static int |
DALOAD
|
static int |
DASTORE
|
static int |
DCMPG
|
static int |
DCMPL
|
static int |
DCONST_0
|
static int |
DCONST_1
|
static int |
DDIV
|
static int |
DLOAD
|
static int |
DLOAD_0
|
static int |
DLOAD_1
|
static int |
DLOAD_2
|
static int |
DLOAD_3
|
static int |
DMUL
|
static int |
DNEG
|
static int |
DREM
|
static int |
DRETURN
|
static int |
DSTORE
|
static int |
DSTORE_0
|
static int |
DSTORE_1
|
static int |
DSTORE_2
|
static int |
DSTORE_3
|
static int |
DSUB
|
static int |
DUP
|
static int |
DUP_X1
|
static int |
DUP_X2
|
static int |
DUP2
|
static int |
DUP2_X1
|
static int |
DUP2_X2
|
static int |
F2D
|
static int |
F2I
|
static int |
F2L
|
static int |
FADD
|
static int |
FALOAD
|
static int |
FASTORE
|
static int |
FCMPG
|
static int |
FCMPL
|
static int |
FCONST_0
|
static int |
FCONST_1
|
static int |
FCONST_2
|
static int |
FDIV
|
static int |
FLOAD
|
static int |
FLOAD_0
|
static int |
FLOAD_1
|
static int |
FLOAD_2
|
static int |
FLOAD_3
|
static int |
FMUL
|
static int |
FNEG
|
static int |
FREM
|
static int |
FRETURN
|
static int |
FSTORE
|
static int |
FSTORE_0
|
static int |
FSTORE_1
|
static int |
FSTORE_2
|
static int |
FSTORE_3
|
static int |
FSUB
|
static int |
GETFIELD
|
static int |
GETSTATIC
|
static int |
GOTO
|
static int |
GOTO_W
|
static int |
I2B
|
static int |
I2C
|
static int |
I2D
|
static int |
I2F
|
static int |
I2L
|
static int |
I2S
|
static int |
IADD
|
static int |
IALOAD
|
static int |
IAND
|
static int |
IASTORE
|
static int |
ICONST_0
|
static int |
ICONST_1
|
static int |
ICONST_2
|
static int |
ICONST_3
|
static int |
ICONST_4
|
static int |
ICONST_5
|
static int |
ICONST_M1
|
static int |
IDIV
|
static int |
IF_ACMPEQ
|
static int |
IF_ACMPNE
|
static int |
IF_ICMPEQ
|
static int |
IF_ICMPGE
|
static int |
IF_ICMPGT
|
static int |
IF_ICMPLE
|
static int |
IF_ICMPLT
|
static int |
IF_ICMPNE
|
static int |
IFEQ
|
static int |
IFGE
|
static int |
IFGT
|
static int |
IFLE
|
static int |
IFLT
|
static int |
IFNE
|
static int |
IFNONNULL
|
static int |
IFNULL
|
static int |
IINC
|
static int |
ILOAD
|
static int |
ILOAD_0
|
static int |
ILOAD_1
|
static int |
ILOAD_2
|
static int |
ILOAD_3
|
static int |
IMPDEP1
|
static int |
IMPDEP2
|
static int |
IMUL
|
static int |
INEG
|
static int |
INSTANCEOF
|
static int |
INVOKEINTERFACE
|
static int |
INVOKESPECIAL
|
static int |
INVOKESTATIC
|
static int |
INVOKEVIRTUAL
|
static int |
IOR
|
static int |
IREM
|
static int |
IRETURN
|
static int |
ISHL
|
static int |
ISHR
|
static int |
ISTORE
|
static int |
ISTORE_0
|
static int |
ISTORE_1
|
static int |
ISTORE_2
|
static int |
ISTORE_3
|
static int |
ISUB
|
static int |
IUSHR
|
static int |
IXOR
|
static int |
JSR
|
static int |
JSR_W
|
static int |
L2D
|
static int |
L2F
|
static int |
L2I
|
static int |
LADD
|
static int |
LALOAD
|
static int |
LAND
|
static int |
LASTORE
|
static int |
LCMP
|
static int |
LCONST_0
|
static int |
LCONST_1
|
static int |
LDC
|
static int |
LDC_W
|
static int |
LDC2_W
|
static int |
LDIV
|
static int |
LLOAD
|
static int |
LLOAD_0
|
static int |
LLOAD_1
|
static int |
LLOAD_2
|
static int |
LLOAD_3
|
static int |
LMUL
|
static int |
LNEG
|
static int |
LOOKUPSWITCH
|
static int |
LOR
|
static int |
LREM
|
static int |
LRETURN
|
static int |
LSHL
|
static int |
LSHR
|
static int |
LSTORE
|
static int |
LSTORE_0
|
static int |
LSTORE_1
|
static int |
LSTORE_2
|
static int |
LSTORE_3
|
static int |
LSUB
|
static int |
LUSHR
|
static int |
LXOR
|
static int |
MONITORENTER
|
static int |
MONITOREXIT
|
static int |
MULTIANEWARRAY
|
static int |
NEW
|
static int |
NEWARRAY
|
static int |
NOP
|
static int |
POP
|
static int |
POP2
|
static int |
PUTFIELD
|
static int |
PUTSTATIC
|
static int |
RET
|
static int |
RETURN
|
static int |
SALOAD
|
static int |
SASTORE
|
static int |
SIPUSH
|
static int |
SWAP
|
static java.util.Comparator<Pair<java.lang.Integer,java.lang.String>> |
switchcomp
|
static int |
T_BOOLEAN
|
static int |
T_BYTE
|
static int |
T_CHAR
|
static int |
T_DOUBLE
|
static int |
T_FLOAT
|
static int |
T_INT
|
static int |
T_LONG
|
static int |
T_SHORT
|
static int |
TABLESWITCH
|
static int |
UNUSED
|
static int |
WIDE
|
Constructor Summary | |
---|---|
Bytecode()
|
Method Summary | |
---|---|
void |
addPoolItems(java.util.Set<Constant.Info> constantPool)
This method adds any constant pool items required by the bytecode to the constantPool. |
static java.lang.String[] |
get()
|
abstract int |
stackDiff()
This method determines the change in stack resulting from this bytecode. |
abstract byte[] |
toBytes(int offset,
java.util.Map<java.lang.String,java.lang.Integer> labelOffsets,
java.util.Map<Constant.Info,java.lang.Integer> constantPool)
Translate this Java bytecode into bytes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.Comparator<Pair<java.lang.Integer,java.lang.String>> switchcomp
public static final int NOP
public static final int ACONST_NULL
public static final int ICONST_M1
public static final int ICONST_0
public static final int ICONST_1
public static final int ICONST_2
public static final int ICONST_3
public static final int ICONST_4
public static final int ICONST_5
public static final int LCONST_0
public static final int LCONST_1
public static final int FCONST_0
public static final int FCONST_1
public static final int FCONST_2
public static final int DCONST_0
public static final int DCONST_1
public static final int BIPUSH
public static final int SIPUSH
public static final int LDC
public static final int LDC_W
public static final int LDC2_W
public static final int ILOAD
public static final int LLOAD
public static final int FLOAD
public static final int DLOAD
public static final int ALOAD
public static final int ILOAD_0
public static final int ILOAD_1
public static final int ILOAD_2
public static final int ILOAD_3
public static final int LLOAD_0
public static final int LLOAD_1
public static final int LLOAD_2
public static final int LLOAD_3
public static final int FLOAD_0
public static final int FLOAD_1
public static final int FLOAD_2
public static final int FLOAD_3
public static final int DLOAD_0
public static final int DLOAD_1
public static final int DLOAD_2
public static final int DLOAD_3
public static final int ALOAD_0
public static final int ALOAD_1
public static final int ALOAD_2
public static final int ALOAD_3
public static final int IALOAD
public static final int LALOAD
public static final int FALOAD
public static final int DALOAD
public static final int AALOAD
public static final int BALOAD
public static final int CALOAD
public static final int SALOAD
public static final int ISTORE
public static final int LSTORE
public static final int FSTORE
public static final int DSTORE
public static final int ASTORE
public static final int ISTORE_0
public static final int ISTORE_1
public static final int ISTORE_2
public static final int ISTORE_3
public static final int LSTORE_0
public static final int LSTORE_1
public static final int LSTORE_2
public static final int LSTORE_3
public static final int FSTORE_0
public static final int FSTORE_1
public static final int FSTORE_2
public static final int FSTORE_3
public static final int DSTORE_0
public static final int DSTORE_1
public static final int DSTORE_2
public static final int DSTORE_3
public static final int ASTORE_0
public static final int ASTORE_1
public static final int ASTORE_2
public static final int ASTORE_3
public static final int IASTORE
public static final int LASTORE
public static final int FASTORE
public static final int DASTORE
public static final int AASTORE
public static final int BASTORE
public static final int CASTORE
public static final int SASTORE
public static final int POP
public static final int POP2
public static final int DUP
public static final int DUP_X1
public static final int DUP_X2
public static final int DUP2
public static final int DUP2_X1
public static final int DUP2_X2
public static final int SWAP
public static final int IADD
public static final int LADD
public static final int FADD
public static final int DADD
public static final int ISUB
public static final int LSUB
public static final int FSUB
public static final int DSUB
public static final int IMUL
public static final int LMUL
public static final int FMUL
public static final int DMUL
public static final int IDIV
public static final int LDIV
public static final int FDIV
public static final int DDIV
public static final int IREM
public static final int LREM
public static final int FREM
public static final int DREM
public static final int INEG
public static final int LNEG
public static final int FNEG
public static final int DNEG
public static final int ISHL
public static final int LSHL
public static final int ISHR
public static final int LSHR
public static final int IUSHR
public static final int LUSHR
public static final int IAND
public static final int LAND
public static final int IOR
public static final int LOR
public static final int IXOR
public static final int LXOR
public static final int IINC
public static final int I2L
public static final int I2F
public static final int I2D
public static final int L2I
public static final int L2F
public static final int L2D
public static final int F2I
public static final int F2L
public static final int F2D
public static final int D2I
public static final int D2L
public static final int D2F
public static final int I2B
public static final int I2C
public static final int I2S
public static final int LCMP
public static final int FCMPL
public static final int FCMPG
public static final int DCMPL
public static final int DCMPG
public static final int IFEQ
public static final int IFNE
public static final int IFLT
public static final int IFGE
public static final int IFGT
public static final int IFLE
public static final int IF_ICMPEQ
public static final int IF_ICMPNE
public static final int IF_ICMPLT
public static final int IF_ICMPGE
public static final int IF_ICMPGT
public static final int IF_ICMPLE
public static final int IF_ACMPEQ
public static final int IF_ACMPNE
public static final int GOTO
public static final int JSR
public static final int RET
public static final int TABLESWITCH
public static final int LOOKUPSWITCH
public static final int IRETURN
public static final int LRETURN
public static final int FRETURN
public static final int DRETURN
public static final int ARETURN
public static final int RETURN
public static final int GETSTATIC
public static final int PUTSTATIC
public static final int GETFIELD
public static final int PUTFIELD
public static final int INVOKEVIRTUAL
public static final int INVOKESPECIAL
public static final int INVOKESTATIC
public static final int INVOKEINTERFACE
public static final int UNUSED
public static final int NEW
public static final int NEWARRAY
public static final int ANEWARRAY
public static final int ARRAYLENGTH
public static final int ATHROW
public static final int CHECKCAST
public static final int INSTANCEOF
public static final int MONITORENTER
public static final int MONITOREXIT
public static final int WIDE
public static final int MULTIANEWARRAY
public static final int IFNULL
public static final int IFNONNULL
public static final int GOTO_W
public static final int JSR_W
public static final int BREAKPOINT
public static final int IMPDEP1
public static final int IMPDEP2
public static final int T_BOOLEAN
public static final int T_CHAR
public static final int T_FLOAT
public static final int T_DOUBLE
public static final int T_BYTE
public static final int T_SHORT
public static final int T_INT
public static final int T_LONG
Constructor Detail |
---|
public Bytecode()
Method Detail |
---|
public abstract int stackDiff()
public void addPoolItems(java.util.Set<Constant.Info> constantPool)
constantPool
- public abstract byte[] toBytes(int offset, java.util.Map<java.lang.String,java.lang.Integer> labelOffsets, java.util.Map<Constant.Info,java.lang.Integer> constantPool)
offset
- Offset of this bytecodelabelOffsets
- Offsets of any labels used in branch bytecodesconstantPool
- Indices of constant pool items used in various bytecodes (e.g.
ldc, putfield, etc)
public static java.lang.String[] get()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |