public class InstructionFactory
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 |
---|
InstructionFactory(org.apache.bcel.generic.ClassGen cg)
Constructor.
|
InstructionFactory(org.apache.bcel.generic.ConstantPoolGen cp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.apache.bcel.generic.CompoundInstruction |
createAdd(int value)
Create instruction to add integers.
|
org.apache.bcel.generic.CompoundInstruction |
createAnd(int value)
Create instruction for logical and for integers.
|
org.apache.bcel.generic.CompoundInstruction |
createCharToString()
Create instruction to convert char to string.
|
org.apache.bcel.generic.GETFIELD |
createGetField(org.apache.bcel.generic.FieldGen field)
Create instruction to get field.
|
org.apache.bcel.generic.GETSTATIC |
createGetStaticField(org.apache.bcel.generic.FieldGen field)
Create instruction to get a static field.
|
biz.onixs.sbe.bcelExt.IINC |
createInc(org.apache.bcel.generic.LocalVariableGen var,
int value)
Create instruction for integer increment.
|
org.apache.bcel.generic.CompoundInstruction |
createIntToString()
Create instruction to convert int to string.
|
static org.apache.bcel.generic.LocalVariableInstruction |
createLoad(org.apache.bcel.generic.LocalVariableGen var)
Create instruction to load local variable.
|
org.apache.bcel.generic.CompoundInstruction |
createLoad(UnifiedMetaData.PrimitiveType type,
boolean isLittleEndian,
org.apache.bcel.generic.LocalVariableGen dataVar,
org.apache.bcel.generic.LocalVariableGen offsetVar,
int constOffset,
org.apache.bcel.generic.Type resultType)
Create instruction to load a primitive field.
|
org.apache.bcel.generic.CompoundInstruction |
createLoadFixedString(org.apache.bcel.generic.MethodGen method,
org.apache.bcel.generic.LocalVariableGen dataVar,
org.apache.bcel.generic.LocalVariableGen offsetVar,
int constOffset,
int length)
Create instruction to load string field.
|
org.apache.bcel.generic.CompoundInstruction |
createLoadHexadecimalString(org.apache.bcel.generic.MethodGen method,
org.apache.bcel.generic.LocalVariableGen dataVar,
org.apache.bcel.generic.LocalVariableGen offsetVar,
int constOffset,
int length) |
org.apache.bcel.generic.InstructionList |
createLoadOffsetVar(org.apache.bcel.generic.LocalVariableGen offsetVar,
int constOffset)
Create instruction to load offset variable.
|
org.apache.bcel.generic.CompoundInstruction |
createLongToString()
Create instruction to convert long to string.
|
org.apache.bcel.generic.PUTFIELD |
createPutField(org.apache.bcel.generic.FieldGen field)
Create instruction to put field.
|
org.apache.bcel.generic.PUTSTATIC |
createPutStaticField(org.apache.bcel.generic.FieldGen field)
Create instruction to put a static field.
|
static org.apache.bcel.generic.LocalVariableInstruction |
createStore(org.apache.bcel.generic.LocalVariableGen var)
Create instruction to store local variable.
|
org.apache.bcel.generic.CompoundInstruction |
createStore(UnifiedMetaData.PrimitiveType type,
boolean isLittleEndian,
org.apache.bcel.generic.LocalVariableGen dataVar,
org.apache.bcel.generic.LocalVariableGen offsetVar,
int constOffset,
org.apache.bcel.generic.LocalVariableGen valueVar)
Create instruction to store primitive field.
|
org.apache.bcel.generic.CompoundInstruction |
createStoreFixedString(org.apache.bcel.generic.MethodGen method,
org.apache.bcel.generic.LocalVariableGen dataVar,
org.apache.bcel.generic.LocalVariableGen offsetVar,
int constOffset,
int length,
org.apache.bcel.generic.LocalVariableGen valueVar)
Create instruction to store string field.
|
static org.apache.bcel.generic.LocalVariableGen |
getVariable(org.apache.bcel.generic.MethodGen method,
String name)
Find method parameter by name.
|
createAppend, createArrayLoad, createArrayStore, createBinaryOperation, createBranchInstruction, createCast, createCheckCast, createConstant, createDup_1, createDup_2, createDup, createFieldAccess, createGetField, createGetStatic, createInstanceOf, createInvoke, createInvoke, createLoad, createNew, createNew, createNewArray, createNull, createPop, createPrintln, createPutField, createPutStatic, createReturn, createStore, createThis, getClassGen, getConstantPool, setClassGen, setConstantPool
public InstructionFactory(org.apache.bcel.generic.ClassGen cg)
cg
- Class generatorpublic InstructionFactory(org.apache.bcel.generic.ConstantPoolGen cp)
cp
- Constant poolpublic static org.apache.bcel.generic.LocalVariableGen getVariable(org.apache.bcel.generic.MethodGen method, String name) throws NoSuchFieldException
method
- methodname
- parameter nameNoSuchFieldException
- if parameter was not foundpublic static org.apache.bcel.generic.LocalVariableInstruction createLoad(org.apache.bcel.generic.LocalVariableGen var)
var
- variable to loadpublic static org.apache.bcel.generic.LocalVariableInstruction createStore(org.apache.bcel.generic.LocalVariableGen var)
var
- variable to storepublic org.apache.bcel.generic.InstructionList createLoadOffsetVar(org.apache.bcel.generic.LocalVariableGen offsetVar, int constOffset)
offsetVar
- offset variable to loadconstOffset
- constant part of offsetpublic org.apache.bcel.generic.CompoundInstruction createLoad(UnifiedMetaData.PrimitiveType type, boolean isLittleEndian, org.apache.bcel.generic.LocalVariableGen dataVar, org.apache.bcel.generic.LocalVariableGen offsetVar, int constOffset, org.apache.bcel.generic.Type resultType)
type
- type of fieldisLittleEndian
- true if is little-endiandataVar
- byte array variableoffsetVar
- offset variableconstOffset
- constant part of offsetresultType
- result typepublic org.apache.bcel.generic.CompoundInstruction createStore(UnifiedMetaData.PrimitiveType type, boolean isLittleEndian, org.apache.bcel.generic.LocalVariableGen dataVar, org.apache.bcel.generic.LocalVariableGen offsetVar, int constOffset, org.apache.bcel.generic.LocalVariableGen valueVar)
type
- type of fieldisLittleEndian
- true if is little-endiandataVar
- byte array variableoffsetVar
- offset variableconstOffset
- constant part of offsetvalueVar
- variable to keep the valuepublic org.apache.bcel.generic.PUTFIELD createPutField(org.apache.bcel.generic.FieldGen field)
field
- field to putpublic org.apache.bcel.generic.PUTSTATIC createPutStaticField(org.apache.bcel.generic.FieldGen field)
field
- field to putpublic org.apache.bcel.generic.GETFIELD createGetField(org.apache.bcel.generic.FieldGen field)
field
- field to getpublic org.apache.bcel.generic.GETSTATIC createGetStaticField(org.apache.bcel.generic.FieldGen field)
field
- field to getpublic org.apache.bcel.generic.CompoundInstruction createLoadFixedString(org.apache.bcel.generic.MethodGen method, org.apache.bcel.generic.LocalVariableGen dataVar, org.apache.bcel.generic.LocalVariableGen offsetVar, int constOffset, int length)
method
- methoddataVar
- byte array variableoffsetVar
- offset variableconstOffset
- constant part of offsetlength
- field lengthpublic org.apache.bcel.generic.CompoundInstruction createLoadHexadecimalString(org.apache.bcel.generic.MethodGen method, org.apache.bcel.generic.LocalVariableGen dataVar, org.apache.bcel.generic.LocalVariableGen offsetVar, int constOffset, int length)
public org.apache.bcel.generic.CompoundInstruction createStoreFixedString(org.apache.bcel.generic.MethodGen method, org.apache.bcel.generic.LocalVariableGen dataVar, org.apache.bcel.generic.LocalVariableGen offsetVar, int constOffset, int length, org.apache.bcel.generic.LocalVariableGen valueVar)
method
- methoddataVar
- byte array variableoffsetVar
- offset variableconstOffset
- constant part of offsetlength
- field lengthvalueVar
- variable which contains valuepublic org.apache.bcel.generic.CompoundInstruction createCharToString()
public org.apache.bcel.generic.CompoundInstruction createAdd(int value)
value
- value to addpublic org.apache.bcel.generic.CompoundInstruction createAnd(int value)
value
- value to andpublic biz.onixs.sbe.bcelExt.IINC createInc(org.apache.bcel.generic.LocalVariableGen var, int value)
var
- local variable to incrementvalue
- increment valuepublic org.apache.bcel.generic.CompoundInstruction createIntToString()
public org.apache.bcel.generic.CompoundInstruction createLongToString()
Copyright © 2005–2024 Onix Solutions. All rights reserved.