Deprecated
as a consequence of InstructionConstants being deprecated. See corresponding docs for further information.
Note
The static createXXX methods return singleton instances from the InstructionConst class.
Const, InstructionConst
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final InstructionFactory. | |
| protected ClassGen | cg
Deprecated
(since 6.0) will be made private; do not access directly, use getter/setter
|
| protected ConstantPoolGen | cp
Deprecated
(since 6.0) will be made private; do not access directly, use getter/setter
|
| private static final String | |
| private static final String[] | SHORT_NAMES
These must agree with the order of Constants.T_CHAR through T_LONG. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Instruction | |
| public static ArrayInstruction | |
| public static ArrayInstruction | |
| private static ArithmeticInstruction | |
| private static ArithmeticInstruction | |
| private static ArithmeticInstruction | |
| private static ArithmeticInstruction | createBinaryLongOp(final char
index into the bootstrap_methods array first, final String name of the called method op)Create an invokedynamic instruction. |
| public static ArithmeticInstruction | createBinaryOperation(final String
operation, such as "+", "*", "<<", etc. op, final Type type)Create binary operation for simple basic types, such as int and float. |
| public static BranchInstruction | createBranchInstruction(final short opcode, final InstructionHandle target)
Create branch instruction by given opcode, except LOOKUPSWITCH and TABLESWITCH. |
| public Instruction | createCast(final Type srcType, final Type destType)
Create conversion operation for two stack operands, this may be an I2C, instruction, e.g., if the operands are basic types and CHECKCAST if they are reference types. |
| public CHECKCAST | |
| public Instruction | createConstant(final Object
must be of type Number, Boolean, Character or String value)Uses PUSH to push a constant value onto the stack. |
| public static StackInstruction | |
| public static StackInstruction | |
| public static StackInstruction | |
| public FieldInstruction | createFieldAccess(final String
name of the accessed class className, final String name of the referenced field name, final Type type of field type, final short how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC kind)Create a field instruction. |
| public GETFIELD | |
| public GETSTATIC | |
| public INSTANCEOF | |
| private InvokeInstruction | |
| public InvokeInstruction | createInvoke(final String
name of the called class className, final String name of the called method name, final Type return type of method retType, final Type[] argument types of method argTypes, final short how to invoke, i.e., INVOKEINTERFACE, INVOKESTATIC, INVOKEVIRTUAL, or INVOKESPECIAL kind)Create an invoke instruction. |
| public InvokeInstruction | Returns: A new InvokeInstruction.name of the called class className, final String name of the called method name, final Type return type of method retType, final Type[] argument types of method argTypes, final short how to invoke: INVOKEINTERFACE, INVOKESTATIC, INVOKEVIRTUAL, or INVOKESPECIAL kind, final boolean force use of InterfaceMethodref useInterface)Create an invoke instruction. |
| public static LocalVariableInstruction | |
| public NEW | |
| public NEW | |
| public Instruction | Returns: an instruction that creates the corresponding array at runtime, i.e. is an AllocationInstructionCreate new array of given size and type. |
| public static Instruction | |
| public static StackInstruction | |
| public InstructionList | createPrintln(final String
the string to print s)Create a call to the most popular System.out.println() method. |
| public PUTFIELD | |
| public PUTSTATIC | |
| public static ReturnInstruction | |
| public static LocalVariableInstruction | |
| public static Instruction | |
| public ClassGen | |
| public ConstantPoolGen | |
| private static boolean | |
| public void | |
| public void |
| APPEND | back to summary |
|---|---|
| private static final String APPEND | |
| APPEND_METHOD_OBJECTS | back to summary |
|---|---|
| private static final InstructionFactory. | |
| cg | back to summary |
|---|---|
| protected ClassGen cg
Deprecated (since 6.0) will be made private; do not access directly, use getter/setter | |
| cp | back to summary |
|---|---|
| protected ConstantPoolGen cp
Deprecated (since 6.0) will be made private; do not access directly, use getter/setter | |
| FQCN_STRING_BUFFER | back to summary |
|---|---|
| private static final String FQCN_STRING_BUFFER | |
| SHORT_NAMES | back to summary |
|---|---|
| private static final String[] SHORT_NAMES These must agree with the order of Constants.T_CHAR through T_LONG. | |
| InstructionFactory | back to summary |
|---|---|
| public InstructionFactory(final ClassGen cg) Initialize with ClassGen object | |
| InstructionFactory | back to summary |
|---|---|
| public InstructionFactory(final ClassGen cg, final ConstantPoolGen cp) | |
| InstructionFactory | back to summary |
|---|---|
| public InstructionFactory(final ConstantPoolGen cp) Initialize just with ConstantPoolGen object | |
| createAppend | back to summary |
|---|---|
| public Instruction createAppend(final Type type) | |
| createArrayLoad | back to summary |
|---|---|
public static ArrayInstruction createArrayLoad(final Type type)
| |
| createArrayStore | back to summary |
|---|---|
public static ArrayInstruction createArrayStore(final Type type)
| |
| createBinaryDoubleOp | back to summary |
|---|---|
| private static ArithmeticInstruction createBinaryDoubleOp(final char op) | |
| createBinaryFloatOp | back to summary |
|---|---|
| private static ArithmeticInstruction createBinaryFloatOp(final char op) | |
| createBinaryIntOp | back to summary |
|---|---|
| private static ArithmeticInstruction createBinaryIntOp(final char first, final String op) | |
| createBinaryLongOp | back to summary |
|---|---|
| private static ArithmeticInstruction createBinaryLongOp(final char first, final String op) Create an invokedynamic instruction. | |
| createBinaryOperation | back to summary |
|---|---|
| public static ArithmeticInstruction createBinaryOperation(final String op, final Type type) Create binary operation for simple basic types, such as int and float.
| |
| createBranchInstruction | back to summary |
|---|---|
| public static BranchInstruction createBranchInstruction(final short opcode, final InstructionHandle target) Create branch instruction by given opcode, except LOOKUPSWITCH and TABLESWITCH. For those you should use the SWITCH compound instruction. | |
| createCast | back to summary |
|---|---|
| public Instruction createCast(final Type srcType, final Type destType) Create conversion operation for two stack operands, this may be an I2C, instruction, e.g., if the operands are basic types and CHECKCAST if they are reference types. | |
| createCheckCast | back to summary |
|---|---|
| public CHECKCAST createCheckCast(final ReferenceType t) | |
| createConstant | back to summary |
|---|---|
| public Instruction createConstant(final Object value) Uses PUSH to push a constant value onto the stack.
| |
| createDup | back to summary |
|---|---|
public static StackInstruction createDup(final int size)
| |
| createDup_1 | back to summary |
|---|---|
public static StackInstruction createDup_1(final int size)
| |
| createDup_2 | back to summary |
|---|---|
public static StackInstruction createDup_2(final int size)
| |
| createFieldAccess | back to summary |
|---|---|
| public FieldInstruction createFieldAccess(final String className, final String name, final Type type, final short kind) Create a field instruction. | |
| createGetField | back to summary |
|---|---|
| public GETFIELD createGetField(final String className, final String name, final Type t) | |
| createGetStatic | back to summary |
|---|---|
| public GETSTATIC createGetStatic(final String className, final String name, final Type t) | |
| createInstanceOf | back to summary |
|---|---|
| public INSTANCEOF createInstanceOf(final ReferenceType t) | |
| createInvoke | back to summary |
|---|---|
| private InvokeInstruction createInvoke(final InstructionFactory. | |
| createInvoke | back to summary |
|---|---|
| public InvokeInstruction createInvoke(final String className, final String name, final Type retType, final Type[] argTypes, final short kind) Create an invoke instruction. (Except for invokedynamic.) | |
| createInvoke | back to summary |
|---|---|
| public InvokeInstruction createInvoke(final String className, final String name, final Type retType, final Type[] argTypes, final short kind, final boolean useInterface) Create an invoke instruction. (Except for invokedynamic.)
| |
| createLoad | back to summary |
|---|---|
public static LocalVariableInstruction createLoad(final Type type, final int index)
| |
| createNew | back to summary |
|---|---|
| public NEW createNew(final ObjectType t) | |
| createNew | back to summary |
|---|---|
| public NEW createNew(final String s) | |
| createNewArray | back to summary |
|---|---|
| public Instruction createNewArray(final Type t, final short dim) Create new array of given size and type.
| |
| createNull | back to summary |
|---|---|
| public static Instruction createNull(final Type type) Create "null" value for reference types, 0 for basic types like int | |
| createPop | back to summary |
|---|---|
public static StackInstruction createPop(final int size)
| |
| createPrintln | back to summary |
|---|---|
| public InstructionList createPrintln(final String s) Create a call to the most popular System.out.println() method.
| |
| createPutField | back to summary |
|---|---|
| public PUTFIELD createPutField(final String className, final String name, final Type t) | |
| createPutStatic | back to summary |
|---|---|
| public PUTSTATIC createPutStatic(final String className, final String name, final Type t) | |
| createReturn | back to summary |
|---|---|
| public static ReturnInstruction createReturn(final Type type) Create typed return | |
| createStore | back to summary |
|---|---|
public static LocalVariableInstruction createStore(final Type type, final int index)
| |
| createThis | back to summary |
|---|---|
| public static Instruction createThis() Create reference to 'this' | |
| getClassGen | back to summary |
|---|---|
| public ClassGen getClassGen() | |
| getConstantPool | back to summary |
|---|---|
| public ConstantPoolGen getConstantPool() | |
| isString | back to summary |
|---|---|
| private static boolean isString(final Type type) | |
| setClassGen | back to summary |
|---|---|
| public void setClassGen(final ClassGen c) | |
| setConstantPool | back to summary |
|---|---|
| public void setConstantPool(final ConstantPoolGen c) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Type[] | |
| pack-priv final String | |
| pack-priv final String | |
| pack-priv final Type |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| argTypes | back to summary |
|---|---|
| pack-priv final Type[] argTypes | |
| className | back to summary |
|---|---|
| pack-priv final String className | |
| name | back to summary |
|---|---|
| pack-priv final String name | |
| resultType | back to summary |
|---|---|
| pack-priv final Type resultType | |
| MethodObject | back to summary |
|---|---|
| pack-priv MethodObject(final String c, final String n, final Type r, final Type[] a) | |