public class InstructionBuilder
extends org.apache.bcel.generic.InstructionFactory
AALOAD, AASTORE, ACONST_NULL, ALOAD_0, ALOAD_1, ALOAD_2, ARETURN, ARRAYLENGTH, ASTORE_0, ASTORE_1, ASTORE_2, ATHROW, BALOAD, BASTORE, bla, CALOAD, CASTORE, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DMUL, DNEG, DREM, DRETURN, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FMUL, FNEG, FREM, FRETURN, FSUB, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, ILOAD_0, ILOAD_1, ILOAD_2, IMUL, INEG, INSTRUCTIONS, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE_0, ISTORE_1, ISTORE_2, ISUB, IUSHR, IXOR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDIV, LMUL, LNEG, LOR, LREM, LRETURN, LSHL, LSHR, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, NOP, POP, POP2, RETURN, SALOAD, SASTORE, SWAP, THIS
Constructor and Description |
---|
InstructionBuilder(org.apache.bcel.generic.ClassGen cg,
org.apache.bcel.generic.ConstantPoolGen cp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.apache.bcel.generic.InvokeInstruction |
createCallInit(java.lang.String name,
java.lang.String signature)
Create invoke initializer instruction from signature.
|
org.apache.bcel.generic.InvokeInstruction |
createCallInterface(ClassItem item)
Create invoke instruction for interface method.
|
org.apache.bcel.generic.InvokeInstruction |
createCallInterface(java.lang.String method,
java.lang.String signature)
Create invoke interface method instruction from signature.
|
org.apache.bcel.generic.InvokeInstruction |
createCallStatic(ClassItem item)
Create invoke instruction for static method.
|
org.apache.bcel.generic.InvokeInstruction |
createCallStatic(java.lang.String method,
java.lang.String signature)
Create invoke static method instruction from signature.
|
org.apache.bcel.generic.InvokeInstruction |
createCallVirtual(ClassItem item)
Create invoke instruction for virtual method.
|
org.apache.bcel.generic.InvokeInstruction |
createCallVirtual(java.lang.String method,
java.lang.String signature)
Create invoke virtual method instruction from signature.
|
org.apache.bcel.generic.FieldInstruction |
createGetField(ClassItem item)
Create getfield instruction.
|
org.apache.bcel.generic.FieldInstruction |
createGetStatic(ClassItem item)
Create getstatic instruction.
|
org.apache.bcel.generic.CompoundInstruction |
createLoadConstant(int value)
Create load constant instruction.
|
org.apache.bcel.generic.CompoundInstruction |
createLoadConstant(java.lang.Object value)
Create load constant instruction.
|
org.apache.bcel.generic.CompoundInstruction |
createLoadConstant(java.lang.String value)
Create load constant instruction.
|
org.apache.bcel.generic.FieldInstruction |
createPutField(ClassItem item)
Create putfield instruction.
|
org.apache.bcel.generic.FieldInstruction |
createPutStatic(ClassItem item)
Create putstatic instruction.
|
org.apache.bcel.generic.ConstantPoolGen |
getConstantPoolGen()
Get constant pool generator.
|
createAppend, createArrayLoad, createArrayStore, createBinaryOperation, createBranchInstruction, createCast, createCheckCast, createConstant, createDup_1, createDup_2, createDup, createFieldAccess, createGetField, createGetStatic, createInstanceOf, createInvoke, createLoad, createNew, createNew, createNewArray, createNull, createPop, createPrintln, createPutField, createPutStatic, createReturn, createStore, createThis, getClassGen, getConstantPool, setClassGen, setConstantPool
public InstructionBuilder(org.apache.bcel.generic.ClassGen cg, org.apache.bcel.generic.ConstantPoolGen cp)
cg
- class generation informationcp
- constant pool generatorpublic org.apache.bcel.generic.ConstantPoolGen getConstantPoolGen()
public org.apache.bcel.generic.CompoundInstruction createLoadConstant(int value)
value
- constant value to be loadedpublic org.apache.bcel.generic.CompoundInstruction createLoadConstant(java.lang.String value)
String
reference
from the constant pool.value
- constant value to be loadedpublic org.apache.bcel.generic.CompoundInstruction createLoadConstant(java.lang.Object value)
value
- constant value to be loadedpublic org.apache.bcel.generic.FieldInstruction createGetField(ClassItem item)
item
- information for field to be setpublic org.apache.bcel.generic.FieldInstruction createPutField(ClassItem item)
item
- information for field to be setpublic org.apache.bcel.generic.FieldInstruction createGetStatic(ClassItem item)
item
- information for field to be setpublic org.apache.bcel.generic.FieldInstruction createPutStatic(ClassItem item)
item
- information for field to be setpublic org.apache.bcel.generic.InvokeInstruction createCallStatic(ClassItem item)
item
- information for method to be calledpublic org.apache.bcel.generic.InvokeInstruction createCallVirtual(ClassItem item)
item
- information for method to be calledpublic org.apache.bcel.generic.InvokeInstruction createCallInterface(ClassItem item)
item
- information for method to be calledpublic org.apache.bcel.generic.InvokeInstruction createCallStatic(java.lang.String method, java.lang.String signature)
method
- fully qualified class and method namesignature
- method signature in standard formpublic org.apache.bcel.generic.InvokeInstruction createCallVirtual(java.lang.String method, java.lang.String signature)
method
- fully qualified class and method namesignature
- method signature in standard formpublic org.apache.bcel.generic.InvokeInstruction createCallInterface(java.lang.String method, java.lang.String signature)
method
- fully qualified interface and method namesignature
- method signature in standard formpublic org.apache.bcel.generic.InvokeInstruction createCallInit(java.lang.String name, java.lang.String signature)
name
- fully qualified class namesignature
- method signature in standard form