public class InstructionSequenceBuilder
extends java.lang.Object
Constructor and Description |
---|
InstructionSequenceBuilder()
Creates a new InstructionSequenceBuilder.
|
InstructionSequenceBuilder(ClassPool programClassPool,
ClassPool libraryClassPool)
Creates a new InstructionSequenceBuilder that automatically initializes class references and
class member references in new constants.
|
InstructionSequenceBuilder(ConstantPoolEditor constantPoolEditor)
Creates a new InstructionSequenceBuilder.
|
InstructionSequenceBuilder(ProgramClass targetClass)
Creates a new InstructionSequenceBuilder.
|
InstructionSequenceBuilder(ProgramClass targetClass,
ClassPool programClassPool,
ClassPool libraryClassPool)
Creates a new InstructionSequenceBuilder that automatically initializes class references and
class member references in new constants.
|
Modifier and Type | Method and Description |
---|---|
Instruction[] |
__()
Short for
instructions() . |
InstructionSequenceBuilder |
aaload() |
InstructionSequenceBuilder |
aastore() |
InstructionSequenceBuilder |
aconst_null() |
InstructionSequenceBuilder |
aload_0() |
InstructionSequenceBuilder |
aload_1() |
InstructionSequenceBuilder |
aload_2() |
InstructionSequenceBuilder |
aload_3() |
InstructionSequenceBuilder |
aload(int variableIndex) |
InstructionSequenceBuilder |
anewarray(Clazz elementType) |
InstructionSequenceBuilder |
anewarray(int constantIndex) |
InstructionSequenceBuilder |
anewarray(java.lang.String elementTypeName,
Clazz referencedClass) |
InstructionSequenceBuilder |
appendInstruction(Instruction instruction)
Appends the given instruction.
|
InstructionSequenceBuilder |
appendInstructions(Instruction[] instructions)
Appends the given instructions.
|
InstructionSequenceBuilder |
areturn() |
InstructionSequenceBuilder |
arraylength() |
InstructionSequenceBuilder |
astore_0() |
InstructionSequenceBuilder |
astore_1() |
InstructionSequenceBuilder |
astore_2() |
InstructionSequenceBuilder |
astore_3() |
InstructionSequenceBuilder |
astore(int variableIndex) |
InstructionSequenceBuilder |
athrow() |
InstructionSequenceBuilder |
baload() |
InstructionSequenceBuilder |
bastore() |
InstructionSequenceBuilder |
bipush(int constant) |
InstructionSequenceBuilder |
boxPrimitiveType(char sourceType)
Box the primitive value present on the stack.
|
InstructionSequenceBuilder |
caload() |
InstructionSequenceBuilder |
castore() |
InstructionSequenceBuilder |
catch_(Instruction instruction)
Short for
appendInstruction(Instruction) . |
InstructionSequenceBuilder |
checkcast(Clazz type) |
InstructionSequenceBuilder |
checkcast(int constantIndex) |
InstructionSequenceBuilder |
checkcast(java.lang.String typeName) |
InstructionSequenceBuilder |
checkcast(java.lang.String typeName,
Clazz referencedClass) |
Constant[] |
constants()
Returns the accumulated set of constants and resets the set in the builder.
|
InstructionSequenceBuilder |
d2f() |
InstructionSequenceBuilder |
d2i() |
InstructionSequenceBuilder |
d2l() |
InstructionSequenceBuilder |
dadd() |
InstructionSequenceBuilder |
daload() |
InstructionSequenceBuilder |
dastore() |
InstructionSequenceBuilder |
dcmpg() |
InstructionSequenceBuilder |
dcmpl() |
InstructionSequenceBuilder |
dconst_0() |
InstructionSequenceBuilder |
dconst_1() |
InstructionSequenceBuilder |
dconst(int constant) |
InstructionSequenceBuilder |
ddiv() |
InstructionSequenceBuilder |
dload_0() |
InstructionSequenceBuilder |
dload_1() |
InstructionSequenceBuilder |
dload_2() |
InstructionSequenceBuilder |
dload_3() |
InstructionSequenceBuilder |
dload(int variableIndex) |
InstructionSequenceBuilder |
dmul() |
InstructionSequenceBuilder |
dneg() |
InstructionSequenceBuilder |
drem() |
InstructionSequenceBuilder |
dreturn() |
InstructionSequenceBuilder |
dstore_0() |
InstructionSequenceBuilder |
dstore_1() |
InstructionSequenceBuilder |
dstore_2() |
InstructionSequenceBuilder |
dstore_3() |
InstructionSequenceBuilder |
dstore(int variableIndex) |
InstructionSequenceBuilder |
dsub() |
InstructionSequenceBuilder |
dup_x1() |
InstructionSequenceBuilder |
dup_x2() |
InstructionSequenceBuilder |
dup() |
InstructionSequenceBuilder |
dup2_x1() |
InstructionSequenceBuilder |
dup2_x2() |
InstructionSequenceBuilder |
dup2() |
InstructionSequenceBuilder |
f2d() |
InstructionSequenceBuilder |
f2i() |
InstructionSequenceBuilder |
f2l() |
InstructionSequenceBuilder |
fadd() |
InstructionSequenceBuilder |
faload() |
InstructionSequenceBuilder |
fastore() |
InstructionSequenceBuilder |
fcmpg() |
InstructionSequenceBuilder |
fcmpl() |
InstructionSequenceBuilder |
fconst_0() |
InstructionSequenceBuilder |
fconst_1() |
InstructionSequenceBuilder |
fconst_2() |
InstructionSequenceBuilder |
fconst(int constant) |
InstructionSequenceBuilder |
fdiv() |
InstructionSequenceBuilder |
fload_0() |
InstructionSequenceBuilder |
fload_1() |
InstructionSequenceBuilder |
fload_2() |
InstructionSequenceBuilder |
fload_3() |
InstructionSequenceBuilder |
fload(int variableIndex) |
InstructionSequenceBuilder |
fmul() |
InstructionSequenceBuilder |
fneg() |
InstructionSequenceBuilder |
frem() |
InstructionSequenceBuilder |
freturn() |
InstructionSequenceBuilder |
fstore_0() |
InstructionSequenceBuilder |
fstore_1() |
InstructionSequenceBuilder |
fstore_2() |
InstructionSequenceBuilder |
fstore_3() |
InstructionSequenceBuilder |
fstore(int variableIndex) |
InstructionSequenceBuilder |
fsub() |
ConstantPoolEditor |
getConstantPoolEditor()
Returns the ConstantPoolEditor used by this builder to create constants.
|
InstructionSequenceBuilder |
getfield(Clazz clazz,
Field field) |
InstructionSequenceBuilder |
getfield(int constantIndex) |
InstructionSequenceBuilder |
getfield(java.lang.String className,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
getfield(java.lang.String className,
java.lang.String name,
java.lang.String descriptor,
Clazz referencedClass,
Field referencedField) |
InstructionSequenceBuilder |
getstatic(Clazz clazz,
Field field) |
InstructionSequenceBuilder |
getstatic(int constantIndex) |
InstructionSequenceBuilder |
getstatic(java.lang.String className,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
getstatic(java.lang.String className,
java.lang.String name,
java.lang.String descriptor,
Clazz referencedClass,
Field referencedField) |
InstructionSequenceBuilder |
goto_(int branchOffset) |
InstructionSequenceBuilder |
goto_w(int branchOffset) |
InstructionSequenceBuilder |
i2b() |
InstructionSequenceBuilder |
i2c() |
InstructionSequenceBuilder |
i2d() |
InstructionSequenceBuilder |
i2f() |
InstructionSequenceBuilder |
i2l() |
InstructionSequenceBuilder |
i2s() |
InstructionSequenceBuilder |
iadd() |
InstructionSequenceBuilder |
iaload() |
InstructionSequenceBuilder |
iand() |
InstructionSequenceBuilder |
iastore() |
InstructionSequenceBuilder |
iconst_0() |
InstructionSequenceBuilder |
iconst_1() |
InstructionSequenceBuilder |
iconst_2() |
InstructionSequenceBuilder |
iconst_3() |
InstructionSequenceBuilder |
iconst_4() |
InstructionSequenceBuilder |
iconst_5() |
InstructionSequenceBuilder |
iconst_m1() |
InstructionSequenceBuilder |
iconst(int constant) |
InstructionSequenceBuilder |
idiv() |
InstructionSequenceBuilder |
ifacmpeq(int branchOffset) |
InstructionSequenceBuilder |
ifacmpne(int branchOffset) |
InstructionSequenceBuilder |
ifeq(int branchOffset) |
InstructionSequenceBuilder |
ifge(int branchOffset) |
InstructionSequenceBuilder |
ifgt(int branchOffset) |
InstructionSequenceBuilder |
ificmpeq(int branchOffset) |
InstructionSequenceBuilder |
ificmpge(int branchOffset) |
InstructionSequenceBuilder |
ificmpgt(int branchOffset) |
InstructionSequenceBuilder |
ificmple(int branchOffset) |
InstructionSequenceBuilder |
ificmplt(int branchOffset) |
InstructionSequenceBuilder |
ificmpne(int branchOffset) |
InstructionSequenceBuilder |
ifle(int branchOffset) |
InstructionSequenceBuilder |
iflt(int branchOffset) |
InstructionSequenceBuilder |
ifne(int branchOffset) |
InstructionSequenceBuilder |
ifnonnull(int branchOffset) |
InstructionSequenceBuilder |
ifnull(int branchOffset) |
InstructionSequenceBuilder |
iinc(int variableIndex,
int constant) |
InstructionSequenceBuilder |
iload_0() |
InstructionSequenceBuilder |
iload_1() |
InstructionSequenceBuilder |
iload_2() |
InstructionSequenceBuilder |
iload_3() |
InstructionSequenceBuilder |
iload(int variableIndex) |
InstructionSequenceBuilder |
imul() |
InstructionSequenceBuilder |
ineg() |
InstructionSequenceBuilder |
instanceof_(Clazz type) |
InstructionSequenceBuilder |
instanceof_(int constantIndex) |
InstructionSequenceBuilder |
instanceof_(java.lang.String typeName,
Clazz referencedClass) |
Instruction[] |
instructions()
Returns the accumulated sequence of instructions and resets the sequence in the builder.
|
InstructionSequenceBuilder |
invokedynamic(int constantIndex) |
InstructionSequenceBuilder |
invokedynamic(int bootStrapMethodIndex,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
invokedynamic(int bootStrapMethodIndex,
java.lang.String name,
java.lang.String descriptor,
Clazz[] referencedClasses) |
InstructionSequenceBuilder |
invokeinterface(Clazz clazz,
Method method) |
InstructionSequenceBuilder |
invokeinterface(int constantIndex,
int constant) |
InstructionSequenceBuilder |
invokeinterface(java.lang.String className,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
invokeinterface(java.lang.String className,
java.lang.String name,
java.lang.String descriptor,
Clazz referencedClass,
Method referencedMethod) |
InstructionSequenceBuilder |
invokespecial_interface(Clazz clazz,
Method method) |
InstructionSequenceBuilder |
invokespecial_interface(java.lang.String className,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
invokespecial_interface(java.lang.String className,
java.lang.String name,
java.lang.String descriptor,
Clazz referencedClass,
Method referencedMethod) |
InstructionSequenceBuilder |
invokespecial(Clazz clazz,
Method method) |
InstructionSequenceBuilder |
invokespecial(int constantIndex) |
InstructionSequenceBuilder |
invokespecial(java.lang.String className,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
invokespecial(java.lang.String className,
java.lang.String name,
java.lang.String descriptor,
Clazz referencedClass,
Method referencedMethod) |
InstructionSequenceBuilder |
invokestatic_interface(Clazz clazz,
Method method) |
InstructionSequenceBuilder |
invokestatic_interface(java.lang.String className,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
invokestatic_interface(java.lang.String className,
java.lang.String name,
java.lang.String descriptor,
Clazz referencedClass,
Method referencedMethod) |
InstructionSequenceBuilder |
invokestatic(Clazz clazz,
Method method) |
InstructionSequenceBuilder |
invokestatic(int constantIndex) |
InstructionSequenceBuilder |
invokestatic(java.lang.String className,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
invokestatic(java.lang.String className,
java.lang.String name,
java.lang.String descriptor,
Clazz referencedClass,
Method referencedMethod) |
InstructionSequenceBuilder |
invokevirtual(Clazz clazz,
Method method) |
InstructionSequenceBuilder |
invokevirtual(int constantIndex) |
InstructionSequenceBuilder |
invokevirtual(int classIndex,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
invokevirtual(java.lang.String className,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
invokevirtual(java.lang.String className,
java.lang.String name,
java.lang.String descriptor,
Clazz referencedClass,
Method referencedMethod) |
InstructionSequenceBuilder |
ior() |
InstructionSequenceBuilder |
irem() |
InstructionSequenceBuilder |
ireturn() |
InstructionSequenceBuilder |
ishl() |
InstructionSequenceBuilder |
ishr() |
InstructionSequenceBuilder |
istore_0() |
InstructionSequenceBuilder |
istore_1() |
InstructionSequenceBuilder |
istore_2() |
InstructionSequenceBuilder |
istore_3() |
InstructionSequenceBuilder |
istore(int variableIndex) |
InstructionSequenceBuilder |
isub() |
InstructionSequenceBuilder |
iushr() |
InstructionSequenceBuilder |
ixor() |
InstructionSequenceBuilder |
jsr_w(int branchOffset) |
InstructionSequenceBuilder |
jsr(int branchOffset) |
InstructionSequenceBuilder |
l2d() |
InstructionSequenceBuilder |
l2f() |
InstructionSequenceBuilder |
l2i() |
InstructionSequenceBuilder |
label(Instruction instruction)
Short for
appendInstruction(Instruction) . |
InstructionSequenceBuilder |
ladd() |
InstructionSequenceBuilder |
laload() |
InstructionSequenceBuilder |
land() |
InstructionSequenceBuilder |
lastore() |
InstructionSequenceBuilder |
lcmp() |
InstructionSequenceBuilder |
lconst_0() |
InstructionSequenceBuilder |
lconst_1() |
InstructionSequenceBuilder |
lconst(int constant) |
InstructionSequenceBuilder |
ldc_(int constantIndex)
Appends an ldc instruction that loads the constant at the given index.
|
InstructionSequenceBuilder |
ldc_(int constantIndex,
ConstantVisitor visitor)
Appends an ldc instruction that loads the constant at the given index.
|
InstructionSequenceBuilder |
ldc_w_(int constantIndex)
Appends an ldc_w instruction that loads the constant at the given index.
|
InstructionSequenceBuilder |
ldc_w_(int constantIndex,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads the constant at the given index.
|
InstructionSequenceBuilder |
ldc_w(Clazz clazz)
Appends an ldc_w instruction that loads a class constant for the given class.
|
InstructionSequenceBuilder |
ldc_w(Clazz clazz,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads a class constant for the given class.
|
InstructionSequenceBuilder |
ldc_w(Clazz clazz,
Member member)
Appends an ldc_w instruction that loads a string constant with the given class member name.
|
InstructionSequenceBuilder |
ldc_w(Clazz clazz,
Member member,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads a string constant with the given class member name.
|
InstructionSequenceBuilder |
ldc_w(float value)
Appends an ldc_w instruction that loads a float constant with the given value.
|
InstructionSequenceBuilder |
ldc_w(float value,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads a float constant with the given value.
|
InstructionSequenceBuilder |
ldc_w(int value)
Appends an ldc_w instruction that loads an integer constant with the given value.
|
InstructionSequenceBuilder |
ldc_w(int value,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads an integer constant with the given value.
|
InstructionSequenceBuilder |
ldc_w(java.lang.Object primitiveArray)
Appends an ldc_w instruction that loads an (internal) primitive array constant with the given
value.
|
InstructionSequenceBuilder |
ldc_w(java.lang.Object primitiveArray,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads an (internal) primitive array constant with the given
value.
|
InstructionSequenceBuilder |
ldc_w(ResourceFile resourceFile)
Appends an ldc_w instruction that loads a string constant with the given resource file name.
|
InstructionSequenceBuilder |
ldc_w(ResourceFile resourceFile,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads a string constant with the given resource file name.
|
InstructionSequenceBuilder |
ldc_w(java.lang.String string)
Appends an ldc_w instruction that loads a string constant with the given value.
|
InstructionSequenceBuilder |
ldc_w(java.lang.String typeName,
Clazz referencedClass)
Appends an ldc_w instruction that loads a class constant for the given type name, that
references the given class.
|
InstructionSequenceBuilder |
ldc_w(java.lang.String typeName,
Clazz referencedClass,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads a class constant for the given type name, that
references the given class.
|
InstructionSequenceBuilder |
ldc_w(java.lang.String string,
Clazz referencedClass,
Member referencedMember)
Appends an ldc_w instruction that loads a string constant with the given value, that references
the given class member.
|
InstructionSequenceBuilder |
ldc_w(java.lang.String string,
Clazz referencedClass,
Member referencedMember,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads a string constant with the given value, that references
the given class member.
|
InstructionSequenceBuilder |
ldc_w(java.lang.String string,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads a string constant with the given value.
|
InstructionSequenceBuilder |
ldc_w(java.lang.String string,
ResourceFile referencedResourceFile)
Appends an ldc_w instruction that loads a string constant with the given value, that references
the given resource file.
|
InstructionSequenceBuilder |
ldc_w(java.lang.String string,
ResourceFile referencedResourceFile,
ConstantVisitor visitor)
Appends an ldc_w instruction that loads a string constant with the given value, that references
the given resource file.
|
InstructionSequenceBuilder |
ldc(Clazz clazz)
Appends an ldc instruction that loads a class constant for the given class.
|
InstructionSequenceBuilder |
ldc(Clazz clazz,
ConstantVisitor visitor)
Appends an ldc instruction that loads a class constant for the given class.
|
InstructionSequenceBuilder |
ldc(Clazz clazz,
Member member)
Appends an ldc instruction that loads a string constant with the given class member name.
|
InstructionSequenceBuilder |
ldc(Clazz clazz,
Member member,
ConstantVisitor visitor)
Appends an ldc instruction that loads a string constant with the given class member name.
|
InstructionSequenceBuilder |
ldc(float value)
Appends an ldc instruction that loads a float constant with the given value.
|
InstructionSequenceBuilder |
ldc(float value,
ConstantVisitor visitor)
Appends an ldc instruction that loads a float constant with the given value.
|
InstructionSequenceBuilder |
ldc(int value)
Appends an ldc instruction that loads an integer constant with the given value.
|
InstructionSequenceBuilder |
ldc(int value,
ConstantVisitor visitor)
Appends an ldc instruction that loads an integer constant with the given value.
|
InstructionSequenceBuilder |
ldc(java.lang.Object primitiveArray)
Appends an ldc instruction that loads an (internal) primitive array constant with the given
value.
|
InstructionSequenceBuilder |
ldc(java.lang.Object primitiveArray,
ConstantVisitor visitor)
Appends an ldc instruction that loads an (internal) primitive array constant with the given
value.
|
InstructionSequenceBuilder |
ldc(ResourceFile resourceFile)
Appends an ldc instruction that loads a string constant with the given resource file name.
|
InstructionSequenceBuilder |
ldc(ResourceFile resourceFile,
ConstantVisitor visitor)
Appends an ldc instruction that loads a string constant with the given resource file name.
|
InstructionSequenceBuilder |
ldc(java.lang.String string)
Appends an ldc instruction that loads a string constant with the given value.
|
InstructionSequenceBuilder |
ldc(java.lang.String typeName,
Clazz referencedClass)
Appends an ldc instruction that loads a class constant for the given type name, that references
the given class.
|
InstructionSequenceBuilder |
ldc(java.lang.String typeName,
Clazz referencedClass,
ConstantVisitor visitor)
Appends an ldc instruction that loads a class constant for the given type name, that references
the given class.
|
InstructionSequenceBuilder |
ldc(java.lang.String string,
Clazz referencedClass,
Member referencedMember)
Appends an ldc instruction that loads a string constant with the given value, that references
the given class member.
|
InstructionSequenceBuilder |
ldc(java.lang.String string,
Clazz referencedClass,
Member referencedMember,
ConstantVisitor visitor)
Appends an ldc instruction that loads a string constant with the given value, that references
the given class member.
|
InstructionSequenceBuilder |
ldc(java.lang.String string,
ConstantVisitor visitor)
Appends an ldc instruction that loads a string constant with the given value.
|
InstructionSequenceBuilder |
ldc(java.lang.String string,
ResourceFile referencedResourceFile)
Appends an ldc instruction that loads a string constant with the given value, that references
the given resource file.
|
InstructionSequenceBuilder |
ldc(java.lang.String string,
ResourceFile referencedResourceFile,
ConstantVisitor visitor)
Appends an ldc instruction that loads a string constant with the given value, that references
the given resource file.
|
InstructionSequenceBuilder |
ldc2_w(double value)
Appends an ldc2_w instruction that loads a double constant with the given value.
|
InstructionSequenceBuilder |
ldc2_w(double value,
ConstantVisitor visitor)
Appends an ldc2_w instruction that loads a double constant with the given value.
|
InstructionSequenceBuilder |
ldc2_w(int constantIndex)
Appends an ldc2_w instruction that loads the Category 2 constant at the given index.
|
InstructionSequenceBuilder |
ldc2_w(int constantIndex,
ConstantVisitor visitor)
Appends an ldc2_w instruction that loads the Category 2 constant at the given index.
|
InstructionSequenceBuilder |
ldc2_w(long value)
Appends an ldc2_w instruction that loads a long constant with the given value.
|
InstructionSequenceBuilder |
ldc2_w(long value,
ConstantVisitor visitor)
Appends an ldc2_w instruction that loads a long constant with the given value.
|
InstructionSequenceBuilder |
ldiv() |
InstructionSequenceBuilder |
line(Instruction instruction)
Short for
appendInstruction(Instruction) . |
InstructionSequenceBuilder |
lload_0() |
InstructionSequenceBuilder |
lload_1() |
InstructionSequenceBuilder |
lload_2() |
InstructionSequenceBuilder |
lload_3() |
InstructionSequenceBuilder |
lload(int variableIndex) |
InstructionSequenceBuilder |
lmul() |
InstructionSequenceBuilder |
lneg() |
InstructionSequenceBuilder |
load(int variableIndex,
char type)
Loads the given variable of primitive type onto the stack.
|
InstructionSequenceBuilder |
load(int variableIndex,
java.lang.String type)
Loads the given variable onto the stack.
|
InstructionSequenceBuilder |
loadFromArray(java.lang.String elementType)
Loads an element from an array.
|
InstructionSequenceBuilder |
lookupswitch(int defaultOffset,
int[] cases,
int[] jumpOffsets) |
InstructionSequenceBuilder |
lor() |
InstructionSequenceBuilder |
lrem() |
InstructionSequenceBuilder |
lreturn() |
InstructionSequenceBuilder |
lshl() |
InstructionSequenceBuilder |
lshr() |
InstructionSequenceBuilder |
lstore_0() |
InstructionSequenceBuilder |
lstore_1() |
InstructionSequenceBuilder |
lstore_2() |
InstructionSequenceBuilder |
lstore_3() |
InstructionSequenceBuilder |
lstore(int variableIndex) |
InstructionSequenceBuilder |
lsub() |
InstructionSequenceBuilder |
lushr() |
InstructionSequenceBuilder |
lxor() |
static void |
main(java.lang.String[] args)
Small sample application that illustrates the use of this class.
|
InstructionSequenceBuilder |
monitorenter() |
InstructionSequenceBuilder |
monitorexit() |
InstructionSequenceBuilder |
multianewarray(Clazz type) |
InstructionSequenceBuilder |
multianewarray(int constantIndex) |
InstructionSequenceBuilder |
multianewarray(java.lang.String typeName) |
InstructionSequenceBuilder |
multianewarray(java.lang.String typeName,
Clazz referencedClass) |
InstructionSequenceBuilder |
new_(Clazz clazz) |
InstructionSequenceBuilder |
new_(int constantIndex) |
InstructionSequenceBuilder |
new_(java.lang.String className) |
InstructionSequenceBuilder |
new_(java.lang.String className,
Clazz referencedClass) |
InstructionSequenceBuilder |
newarray(int constant) |
InstructionSequenceBuilder |
nop() |
InstructionSequenceBuilder |
pop() |
InstructionSequenceBuilder |
pop2() |
InstructionSequenceBuilder |
pushBoxedPrimitive(java.lang.Object value,
java.lang.String type)
Push a primitive on the stack followed by a call to it's boxed valueOf method.
|
InstructionSequenceBuilder |
pushDefault(java.lang.String type)
Pushes a default value onto the stack.
|
InstructionSequenceBuilder |
pushDouble(double value)
Pushes the given primitive double on the stack in the most efficient way (as a dconst or ldc
instruction).
|
InstructionSequenceBuilder |
pushFloat(float value)
Pushes the given primitive float on the stack in the most efficient way (as an fconst or ldc
instruction).
|
InstructionSequenceBuilder |
pushInt(int value)
Pushes the given primitive int on the stack in the most efficient way (as an iconst, bipush,
sipush, or ldc instruction).
|
InstructionSequenceBuilder |
pushLong(long value)
Pushes the given primitive long on the stack in the most efficient way (as an lconst or ldc
instruction).
|
InstructionSequenceBuilder |
pushNewArray(java.lang.String type,
int size)
Pushes a new array on the stack.
|
InstructionSequenceBuilder |
pushPrimitive(java.lang.Object value,
char type)
Pushes the given primitive value on the stack.
|
InstructionSequenceBuilder |
pushPrimitiveOrString(java.lang.Object value,
java.lang.String type)
Pushes the given string or primitive on the stack.
|
InstructionSequenceBuilder |
pushPrimitiveOrString(java.lang.Object value,
java.lang.String type,
boolean allowBoxing)
Pushes the given string or primitive on the stack.
|
InstructionSequenceBuilder |
pushPrimitiveOrStringArray(java.lang.String type,
java.lang.Object[] values)
Pushes a new array with given values onto the stack.
|
InstructionSequenceBuilder |
putfield(Clazz clazz,
Field field) |
InstructionSequenceBuilder |
putfield(int constantIndex) |
InstructionSequenceBuilder |
putfield(java.lang.String className,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
putfield(java.lang.String className,
java.lang.String name,
java.lang.String descriptor,
Clazz referencedClass,
Field referencedField) |
InstructionSequenceBuilder |
putstatic(Clazz clazz,
Field field) |
InstructionSequenceBuilder |
putstatic(int constantIndex) |
InstructionSequenceBuilder |
putstatic(java.lang.String className,
java.lang.String name,
java.lang.String descriptor) |
InstructionSequenceBuilder |
putstatic(java.lang.String className,
java.lang.String name,
java.lang.String descriptor,
Clazz referencedClass,
Field referencedField) |
InstructionSequenceBuilder |
ret(int variableIndex) |
InstructionSequenceBuilder |
return_() |
InstructionSequenceBuilder |
saload() |
InstructionSequenceBuilder |
sastore() |
InstructionSequenceBuilder |
sipush(int constant) |
int |
size()
Returns the number of instructions accumulated by this InstructionSequenceBuilder.
|
InstructionSequenceBuilder |
store(int variableIndex,
char type)
Stores the primitve value on top of the stack in the variable with given index.
|
InstructionSequenceBuilder |
store(int variableIndex,
java.lang.String type)
Stores the value on top of the stack in the variable with given index.
|
InstructionSequenceBuilder |
storeToArray(java.lang.String elementType)
Stores an element to an array.
|
InstructionSequenceBuilder |
swap() |
InstructionSequenceBuilder |
tableswitch(int defaultOffset,
int lowCase,
int highCase,
int[] jumpOffsets) |
InstructionSequenceBuilder |
unboxPrimitiveType(java.lang.String sourceType,
java.lang.String targetType)
Unbox the object on the stack to a primitive value.
|
InstructionSequenceBuilder |
wide() |
public InstructionSequenceBuilder()
public InstructionSequenceBuilder(ClassPool programClassPool, ClassPool libraryClassPool)
programClassPool
- The program class pool from which new constants can be initialized.libraryClassPool
- The library class pool from which new constants can be initialized.public InstructionSequenceBuilder(ProgramClass targetClass)
targetClass
- The target class for the instruction constants.public InstructionSequenceBuilder(ProgramClass targetClass, ClassPool programClassPool, ClassPool libraryClassPool)
targetClass
- The target class for the instruction constants.programClassPool
- The program class pool from which new constants can be initialized.libraryClassPool
- The library class pool from which new constants can be initialized.public InstructionSequenceBuilder(ConstantPoolEditor constantPoolEditor)
constantPoolEditor
- The editor to use for creating any constants for the instructions.public ConstantPoolEditor getConstantPoolEditor()
public InstructionSequenceBuilder label(Instruction instruction)
appendInstruction(Instruction)
.InstructionSequenceReplacer.label()
public InstructionSequenceBuilder catch_(Instruction instruction)
appendInstruction(Instruction)
.public InstructionSequenceBuilder line(Instruction instruction)
appendInstruction(Instruction)
.public InstructionSequenceBuilder appendInstruction(Instruction instruction)
instruction
- The instruction to be appended.public InstructionSequenceBuilder appendInstructions(Instruction[] instructions)
instructions
- The instructions to be appended.public Instruction[] __()
instructions()
.public Instruction[] instructions()
public Constant[] constants()
public int size()
public InstructionSequenceBuilder nop()
public InstructionSequenceBuilder aconst_null()
public InstructionSequenceBuilder iconst(int constant)
public InstructionSequenceBuilder iconst_m1()
public InstructionSequenceBuilder iconst_0()
public InstructionSequenceBuilder iconst_1()
public InstructionSequenceBuilder iconst_2()
public InstructionSequenceBuilder iconst_3()
public InstructionSequenceBuilder iconst_4()
public InstructionSequenceBuilder iconst_5()
public InstructionSequenceBuilder lconst(int constant)
public InstructionSequenceBuilder lconst_0()
public InstructionSequenceBuilder lconst_1()
public InstructionSequenceBuilder fconst(int constant)
public InstructionSequenceBuilder fconst_0()
public InstructionSequenceBuilder fconst_1()
public InstructionSequenceBuilder fconst_2()
public InstructionSequenceBuilder dconst(int constant)
public InstructionSequenceBuilder dconst_0()
public InstructionSequenceBuilder dconst_1()
public InstructionSequenceBuilder bipush(int constant)
public InstructionSequenceBuilder sipush(int constant)
public InstructionSequenceBuilder ldc(int value)
public InstructionSequenceBuilder ldc(int value, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc(float value)
public InstructionSequenceBuilder ldc(float value, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc(java.lang.String string)
public InstructionSequenceBuilder ldc(java.lang.String string, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc(java.lang.Object primitiveArray)
public InstructionSequenceBuilder ldc(java.lang.Object primitiveArray, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc(Clazz clazz, Member member)
public InstructionSequenceBuilder ldc(Clazz clazz, Member member, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc(java.lang.String string, Clazz referencedClass, Member referencedMember)
public InstructionSequenceBuilder ldc(java.lang.String string, Clazz referencedClass, Member referencedMember, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc(ResourceFile resourceFile)
public InstructionSequenceBuilder ldc(ResourceFile resourceFile, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc(java.lang.String string, ResourceFile referencedResourceFile)
public InstructionSequenceBuilder ldc(java.lang.String string, ResourceFile referencedResourceFile, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc(Clazz clazz)
public InstructionSequenceBuilder ldc(Clazz clazz, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc(java.lang.String typeName, Clazz referencedClass)
public InstructionSequenceBuilder ldc(java.lang.String typeName, Clazz referencedClass, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_(int constantIndex)
public InstructionSequenceBuilder ldc_(int constantIndex, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w(int value)
public InstructionSequenceBuilder ldc_w(int value, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w(float value)
public InstructionSequenceBuilder ldc_w(float value, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w(java.lang.String string)
public InstructionSequenceBuilder ldc_w(java.lang.String string, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w(java.lang.Object primitiveArray)
public InstructionSequenceBuilder ldc_w(java.lang.Object primitiveArray, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w(Clazz clazz, Member member)
public InstructionSequenceBuilder ldc_w(Clazz clazz, Member member, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w(java.lang.String string, Clazz referencedClass, Member referencedMember)
public InstructionSequenceBuilder ldc_w(java.lang.String string, Clazz referencedClass, Member referencedMember, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w(ResourceFile resourceFile)
public InstructionSequenceBuilder ldc_w(ResourceFile resourceFile, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w(java.lang.String string, ResourceFile referencedResourceFile)
public InstructionSequenceBuilder ldc_w(java.lang.String string, ResourceFile referencedResourceFile, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w(Clazz clazz)
public InstructionSequenceBuilder ldc_w(Clazz clazz, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w(java.lang.String typeName, Clazz referencedClass)
public InstructionSequenceBuilder ldc_w(java.lang.String typeName, Clazz referencedClass, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc_w_(int constantIndex)
public InstructionSequenceBuilder ldc_w_(int constantIndex, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc2_w(long value)
public InstructionSequenceBuilder ldc2_w(long value, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc2_w(double value)
public InstructionSequenceBuilder ldc2_w(double value, ConstantVisitor visitor)
public InstructionSequenceBuilder ldc2_w(int constantIndex)
public InstructionSequenceBuilder ldc2_w(int constantIndex, ConstantVisitor visitor)
public InstructionSequenceBuilder iload(int variableIndex)
public InstructionSequenceBuilder lload(int variableIndex)
public InstructionSequenceBuilder fload(int variableIndex)
public InstructionSequenceBuilder dload(int variableIndex)
public InstructionSequenceBuilder aload(int variableIndex)
public InstructionSequenceBuilder iload_0()
public InstructionSequenceBuilder iload_1()
public InstructionSequenceBuilder iload_2()
public InstructionSequenceBuilder iload_3()
public InstructionSequenceBuilder lload_0()
public InstructionSequenceBuilder lload_1()
public InstructionSequenceBuilder lload_2()
public InstructionSequenceBuilder lload_3()
public InstructionSequenceBuilder fload_0()
public InstructionSequenceBuilder fload_1()
public InstructionSequenceBuilder fload_2()
public InstructionSequenceBuilder fload_3()
public InstructionSequenceBuilder dload_0()
public InstructionSequenceBuilder dload_1()
public InstructionSequenceBuilder dload_2()
public InstructionSequenceBuilder dload_3()
public InstructionSequenceBuilder aload_0()
public InstructionSequenceBuilder aload_1()
public InstructionSequenceBuilder aload_2()
public InstructionSequenceBuilder aload_3()
public InstructionSequenceBuilder iaload()
public InstructionSequenceBuilder laload()
public InstructionSequenceBuilder faload()
public InstructionSequenceBuilder daload()
public InstructionSequenceBuilder aaload()
public InstructionSequenceBuilder baload()
public InstructionSequenceBuilder caload()
public InstructionSequenceBuilder saload()
public InstructionSequenceBuilder istore(int variableIndex)
public InstructionSequenceBuilder lstore(int variableIndex)
public InstructionSequenceBuilder fstore(int variableIndex)
public InstructionSequenceBuilder dstore(int variableIndex)
public InstructionSequenceBuilder astore(int variableIndex)
public InstructionSequenceBuilder istore_0()
public InstructionSequenceBuilder istore_1()
public InstructionSequenceBuilder istore_2()
public InstructionSequenceBuilder istore_3()
public InstructionSequenceBuilder lstore_0()
public InstructionSequenceBuilder lstore_1()
public InstructionSequenceBuilder lstore_2()
public InstructionSequenceBuilder lstore_3()
public InstructionSequenceBuilder fstore_0()
public InstructionSequenceBuilder fstore_1()
public InstructionSequenceBuilder fstore_2()
public InstructionSequenceBuilder fstore_3()
public InstructionSequenceBuilder dstore_0()
public InstructionSequenceBuilder dstore_1()
public InstructionSequenceBuilder dstore_2()
public InstructionSequenceBuilder dstore_3()
public InstructionSequenceBuilder astore_0()
public InstructionSequenceBuilder astore_1()
public InstructionSequenceBuilder astore_2()
public InstructionSequenceBuilder astore_3()
public InstructionSequenceBuilder iastore()
public InstructionSequenceBuilder lastore()
public InstructionSequenceBuilder fastore()
public InstructionSequenceBuilder dastore()
public InstructionSequenceBuilder aastore()
public InstructionSequenceBuilder bastore()
public InstructionSequenceBuilder castore()
public InstructionSequenceBuilder sastore()
public InstructionSequenceBuilder pop()
public InstructionSequenceBuilder pop2()
public InstructionSequenceBuilder dup()
public InstructionSequenceBuilder dup_x1()
public InstructionSequenceBuilder dup_x2()
public InstructionSequenceBuilder dup2()
public InstructionSequenceBuilder dup2_x1()
public InstructionSequenceBuilder dup2_x2()
public InstructionSequenceBuilder swap()
public InstructionSequenceBuilder iadd()
public InstructionSequenceBuilder ladd()
public InstructionSequenceBuilder fadd()
public InstructionSequenceBuilder dadd()
public InstructionSequenceBuilder isub()
public InstructionSequenceBuilder lsub()
public InstructionSequenceBuilder fsub()
public InstructionSequenceBuilder dsub()
public InstructionSequenceBuilder imul()
public InstructionSequenceBuilder lmul()
public InstructionSequenceBuilder fmul()
public InstructionSequenceBuilder dmul()
public InstructionSequenceBuilder idiv()
public InstructionSequenceBuilder ldiv()
public InstructionSequenceBuilder fdiv()
public InstructionSequenceBuilder ddiv()
public InstructionSequenceBuilder irem()
public InstructionSequenceBuilder lrem()
public InstructionSequenceBuilder frem()
public InstructionSequenceBuilder drem()
public InstructionSequenceBuilder ineg()
public InstructionSequenceBuilder lneg()
public InstructionSequenceBuilder fneg()
public InstructionSequenceBuilder dneg()
public InstructionSequenceBuilder ishl()
public InstructionSequenceBuilder lshl()
public InstructionSequenceBuilder ishr()
public InstructionSequenceBuilder lshr()
public InstructionSequenceBuilder iushr()
public InstructionSequenceBuilder lushr()
public InstructionSequenceBuilder iand()
public InstructionSequenceBuilder land()
public InstructionSequenceBuilder ior()
public InstructionSequenceBuilder lor()
public InstructionSequenceBuilder ixor()
public InstructionSequenceBuilder lxor()
public InstructionSequenceBuilder iinc(int variableIndex, int constant)
public InstructionSequenceBuilder i2l()
public InstructionSequenceBuilder i2f()
public InstructionSequenceBuilder i2d()
public InstructionSequenceBuilder l2i()
public InstructionSequenceBuilder l2f()
public InstructionSequenceBuilder l2d()
public InstructionSequenceBuilder f2i()
public InstructionSequenceBuilder f2l()
public InstructionSequenceBuilder f2d()
public InstructionSequenceBuilder d2i()
public InstructionSequenceBuilder d2l()
public InstructionSequenceBuilder d2f()
public InstructionSequenceBuilder i2b()
public InstructionSequenceBuilder i2c()
public InstructionSequenceBuilder i2s()
public InstructionSequenceBuilder lcmp()
public InstructionSequenceBuilder fcmpl()
public InstructionSequenceBuilder fcmpg()
public InstructionSequenceBuilder dcmpl()
public InstructionSequenceBuilder dcmpg()
public InstructionSequenceBuilder ifeq(int branchOffset)
public InstructionSequenceBuilder ifne(int branchOffset)
public InstructionSequenceBuilder iflt(int branchOffset)
public InstructionSequenceBuilder ifge(int branchOffset)
public InstructionSequenceBuilder ifgt(int branchOffset)
public InstructionSequenceBuilder ifle(int branchOffset)
public InstructionSequenceBuilder ificmpeq(int branchOffset)
public InstructionSequenceBuilder ificmpne(int branchOffset)
public InstructionSequenceBuilder ificmplt(int branchOffset)
public InstructionSequenceBuilder ificmpge(int branchOffset)
public InstructionSequenceBuilder ificmpgt(int branchOffset)
public InstructionSequenceBuilder ificmple(int branchOffset)
public InstructionSequenceBuilder ifacmpeq(int branchOffset)
public InstructionSequenceBuilder ifacmpne(int branchOffset)
public InstructionSequenceBuilder goto_(int branchOffset)
public InstructionSequenceBuilder jsr(int branchOffset)
public InstructionSequenceBuilder ret(int variableIndex)
public InstructionSequenceBuilder tableswitch(int defaultOffset, int lowCase, int highCase, int[] jumpOffsets)
public InstructionSequenceBuilder lookupswitch(int defaultOffset, int[] cases, int[] jumpOffsets)
public InstructionSequenceBuilder ireturn()
public InstructionSequenceBuilder lreturn()
public InstructionSequenceBuilder freturn()
public InstructionSequenceBuilder dreturn()
public InstructionSequenceBuilder areturn()
public InstructionSequenceBuilder return_()
public InstructionSequenceBuilder getstatic(Clazz clazz, Field field)
public InstructionSequenceBuilder getstatic(java.lang.String className, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder getstatic(java.lang.String className, java.lang.String name, java.lang.String descriptor, Clazz referencedClass, Field referencedField)
public InstructionSequenceBuilder getstatic(int constantIndex)
public InstructionSequenceBuilder putstatic(Clazz clazz, Field field)
public InstructionSequenceBuilder putstatic(java.lang.String className, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder putstatic(java.lang.String className, java.lang.String name, java.lang.String descriptor, Clazz referencedClass, Field referencedField)
public InstructionSequenceBuilder putstatic(int constantIndex)
public InstructionSequenceBuilder getfield(Clazz clazz, Field field)
public InstructionSequenceBuilder getfield(java.lang.String className, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder getfield(java.lang.String className, java.lang.String name, java.lang.String descriptor, Clazz referencedClass, Field referencedField)
public InstructionSequenceBuilder getfield(int constantIndex)
public InstructionSequenceBuilder putfield(Clazz clazz, Field field)
public InstructionSequenceBuilder putfield(java.lang.String className, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder putfield(java.lang.String className, java.lang.String name, java.lang.String descriptor, Clazz referencedClass, Field referencedField)
public InstructionSequenceBuilder putfield(int constantIndex)
public InstructionSequenceBuilder invokevirtual(Clazz clazz, Method method)
public InstructionSequenceBuilder invokevirtual(java.lang.String className, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder invokevirtual(int classIndex, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder invokevirtual(java.lang.String className, java.lang.String name, java.lang.String descriptor, Clazz referencedClass, Method referencedMethod)
public InstructionSequenceBuilder invokevirtual(int constantIndex)
public InstructionSequenceBuilder invokespecial(Clazz clazz, Method method)
public InstructionSequenceBuilder invokespecial(java.lang.String className, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder invokespecial(java.lang.String className, java.lang.String name, java.lang.String descriptor, Clazz referencedClass, Method referencedMethod)
public InstructionSequenceBuilder invokespecial_interface(Clazz clazz, Method method)
public InstructionSequenceBuilder invokespecial_interface(java.lang.String className, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder invokespecial_interface(java.lang.String className, java.lang.String name, java.lang.String descriptor, Clazz referencedClass, Method referencedMethod)
public InstructionSequenceBuilder invokespecial(int constantIndex)
public InstructionSequenceBuilder invokestatic(Clazz clazz, Method method)
public InstructionSequenceBuilder invokestatic(java.lang.String className, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder invokestatic(java.lang.String className, java.lang.String name, java.lang.String descriptor, Clazz referencedClass, Method referencedMethod)
public InstructionSequenceBuilder invokestatic_interface(Clazz clazz, Method method)
public InstructionSequenceBuilder invokestatic_interface(java.lang.String className, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder invokestatic_interface(java.lang.String className, java.lang.String name, java.lang.String descriptor, Clazz referencedClass, Method referencedMethod)
public InstructionSequenceBuilder invokestatic(int constantIndex)
public InstructionSequenceBuilder invokeinterface(Clazz clazz, Method method)
public InstructionSequenceBuilder invokeinterface(java.lang.String className, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder invokeinterface(java.lang.String className, java.lang.String name, java.lang.String descriptor, Clazz referencedClass, Method referencedMethod)
public InstructionSequenceBuilder invokeinterface(int constantIndex, int constant)
public InstructionSequenceBuilder invokedynamic(int bootStrapMethodIndex, java.lang.String name, java.lang.String descriptor)
public InstructionSequenceBuilder invokedynamic(int bootStrapMethodIndex, java.lang.String name, java.lang.String descriptor, Clazz[] referencedClasses)
public InstructionSequenceBuilder invokedynamic(int constantIndex)
public InstructionSequenceBuilder new_(Clazz clazz)
public InstructionSequenceBuilder new_(java.lang.String className)
public InstructionSequenceBuilder new_(java.lang.String className, Clazz referencedClass)
public InstructionSequenceBuilder new_(int constantIndex)
public InstructionSequenceBuilder newarray(int constant)
public InstructionSequenceBuilder anewarray(Clazz elementType)
public InstructionSequenceBuilder anewarray(java.lang.String elementTypeName, Clazz referencedClass)
public InstructionSequenceBuilder anewarray(int constantIndex)
public InstructionSequenceBuilder arraylength()
public InstructionSequenceBuilder athrow()
public InstructionSequenceBuilder checkcast(Clazz type)
public InstructionSequenceBuilder checkcast(java.lang.String typeName)
public InstructionSequenceBuilder checkcast(java.lang.String typeName, Clazz referencedClass)
public InstructionSequenceBuilder checkcast(int constantIndex)
public InstructionSequenceBuilder instanceof_(Clazz type)
public InstructionSequenceBuilder instanceof_(java.lang.String typeName, Clazz referencedClass)
public InstructionSequenceBuilder instanceof_(int constantIndex)
public InstructionSequenceBuilder monitorenter()
public InstructionSequenceBuilder monitorexit()
public InstructionSequenceBuilder wide()
public InstructionSequenceBuilder multianewarray(Clazz type)
public InstructionSequenceBuilder multianewarray(java.lang.String typeName)
public InstructionSequenceBuilder multianewarray(java.lang.String typeName, Clazz referencedClass)
public InstructionSequenceBuilder multianewarray(int constantIndex)
public InstructionSequenceBuilder ifnull(int branchOffset)
public InstructionSequenceBuilder ifnonnull(int branchOffset)
public InstructionSequenceBuilder goto_w(int branchOffset)
public InstructionSequenceBuilder jsr_w(int branchOffset)
public InstructionSequenceBuilder pushPrimitive(java.lang.Object value, char type)
Operand stack: ... -> ..., value.
value
- The primitive value to be pushed - should never be null.type
- The internal type of the primitive ('Z','B','I',...).public InstructionSequenceBuilder boxPrimitiveType(char sourceType)
Operand stack: ..., primitive -> ..., boxed_primitive.
sourceType
- Type of the primitive on the stack.public InstructionSequenceBuilder unboxPrimitiveType(java.lang.String sourceType, java.lang.String targetType)
Operand stack: ..., boxed_primitive -> ..., primitive.
sourceType
- Type of the primitive that should be unboxed.targetType
- Resulting type.public InstructionSequenceBuilder pushPrimitiveOrString(java.lang.Object value, java.lang.String type)
value
- The primitive value to be pushed - should never be null.type
- The internal type of the primitive ('Z','B','I',...).java.lang.IllegalArgumentException
- if the type is neither primitive or Ljava/lang/String;
.public InstructionSequenceBuilder pushPrimitiveOrString(java.lang.Object value, java.lang.String type, boolean allowBoxing)
value
- The primitive value to be pushed - should never be null.type
- The internal type of the primitive ('Z','B','I',...).allowBoxing
- If the type is a primitive wrapper class, set allowBoxing = true, to push a
boxed primitive.java.lang.IllegalArgumentException
- if the type is neither primitive or Ljava/lang/String;
.public InstructionSequenceBuilder pushBoxedPrimitive(java.lang.Object value, java.lang.String type)
value
- The value.type
- The type, e.g. Ljava/lang/Integer;
.public InstructionSequenceBuilder pushInt(int value)
value
- The int value to be pushed.public InstructionSequenceBuilder pushFloat(float value)
value
- The float value to be pushed.public InstructionSequenceBuilder pushLong(long value)
value
- The long to be pushed.public InstructionSequenceBuilder pushDouble(double value)
value
- The double value to be pushed.public InstructionSequenceBuilder pushNewArray(java.lang.String type, int size)
Operand stack: ... -> ..., array.
type
- The array element type (or class name in case of objects).size
- The size of the array to be created.public InstructionSequenceBuilder pushPrimitiveOrStringArray(java.lang.String type, java.lang.Object[] values)
For primitives you can specify, for example, either I or Ljava/lang/Integer; to create an object array or a primitive array.
Operand stack: ... -> ..., array.
type
- The array element type (or class name in case of objects).values
- The array values.public InstructionSequenceBuilder pushDefault(java.lang.String type)
Either 0 for primitives or null for objects.
type
- The type.public InstructionSequenceBuilder load(int variableIndex, java.lang.String type)
Operand stack: ... -> ..., value.
variableIndex
- The index of the variable to be loaded.type
- The type of the variable to be loaded.public InstructionSequenceBuilder load(int variableIndex, char type)
Operand stack: ... -> ..., value.
variableIndex
- The index of the variable to be loaded.type
- The type of the variable to be loaded.public InstructionSequenceBuilder store(int variableIndex, java.lang.String type)
Operand stsack: ..., value -> ...
variableIndex
- The index of the variable where to store the value.type
- The type of the value to be stored.public InstructionSequenceBuilder store(int variableIndex, char type)
Operand stack: ..., value -> ...
variableIndex
- The index of the variable where to store the value.type
- The type of the value to be stored.public InstructionSequenceBuilder storeToArray(java.lang.String elementType)
Operand stack: ..., array, index, value -> ...
elementType
- The type of the value to be stored.public InstructionSequenceBuilder loadFromArray(java.lang.String elementType)
Operand stack: ..., array, index -> ..., value.
elementType
- The type of the value to be loaded.public static void main(java.lang.String[] args)