public class InstructionBuilder
extends InstructionFactory
| Constructor and Description |
|---|
InstructionBuilder(ClassGen cg,
ConstantPoolGen cp)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
InvokeInstruction |
createCallInit(java.lang.String name,
java.lang.String signature)
Create invoke initializer instruction from signature.
|
InvokeInstruction |
createCallInterface(ClassItem item)
Create invoke instruction for interface method.
|
InvokeInstruction |
createCallInterface(java.lang.String method,
java.lang.String signature)
Create invoke interface method instruction from signature.
|
InvokeInstruction |
createCallStatic(ClassItem item)
Create invoke instruction for static method.
|
InvokeInstruction |
createCallStatic(java.lang.String method,
java.lang.String signature)
Create invoke static method instruction from signature.
|
InvokeInstruction |
createCallVirtual(ClassItem item)
Create invoke instruction for virtual method.
|
InvokeInstruction |
createCallVirtual(java.lang.String method,
java.lang.String signature)
Create invoke virtual method instruction from signature.
|
FieldInstruction |
createGetField(ClassItem item)
Create getfield instruction.
|
FieldInstruction |
createGetStatic(ClassItem item)
Create getstatic instruction.
|
CompoundInstruction |
createLoadConstant(int value)
Create load constant instruction.
|
CompoundInstruction |
createLoadConstant(java.lang.Object value)
Create load constant instruction.
|
CompoundInstruction |
createLoadConstant(java.lang.String value)
Create load constant instruction.
|
FieldInstruction |
createPutField(ClassItem item)
Create putfield instruction.
|
FieldInstruction |
createPutStatic(ClassItem item)
Create putstatic instruction.
|
ConstantPoolGen |
getConstantPoolGen()
Get constant pool generator.
|
public InstructionBuilder(ClassGen cg,
ConstantPoolGen cp)
cg - class generation informationcp - constant pool generatorpublic ConstantPoolGen getConstantPoolGen()
public CompoundInstruction createLoadConstant(int value)
value - constant value to be loadedpublic CompoundInstruction createLoadConstant(java.lang.String value)
String reference
from the constant pool.value - constant value to be loadedpublic CompoundInstruction createLoadConstant(java.lang.Object value)
value - constant value to be loadedpublic FieldInstruction createGetField(ClassItem item)
item - information for field to be setpublic FieldInstruction createPutField(ClassItem item)
item - information for field to be setpublic FieldInstruction createGetStatic(ClassItem item)
item - information for field to be setpublic FieldInstruction createPutStatic(ClassItem item)
item - information for field to be setpublic InvokeInstruction createCallStatic(ClassItem item)
item - information for method to be calledpublic InvokeInstruction createCallVirtual(ClassItem item)
item - information for method to be calledpublic InvokeInstruction createCallInterface(ClassItem item)
item - information for method to be calledpublic InvokeInstruction createCallStatic(java.lang.String method,
java.lang.String signature)
method - fully qualified class and method namesignature - method signature in standard formpublic InvokeInstruction createCallVirtual(java.lang.String method,
java.lang.String signature)
method - fully qualified class and method namesignature - method signature in standard formpublic InvokeInstruction createCallInterface(java.lang.String method,
java.lang.String signature)
method - fully qualified interface and method namesignature - method signature in standard formpublic InvokeInstruction createCallInit(java.lang.String name,
java.lang.String signature)
name - fully qualified class namesignature - method signature in standard form