void |
TryCatchBlock.addCatch(java.lang.String exceptionClassName,
InstructionBuilderCallback callback) |
Ends the block (if not already ended) and inserts a catch block for the named exception.
|
void |
TryCatchBlock.addFinally(InstructionBuilderCallback callback) |
|
InstructionBuilder |
InstructionBuilder.arrayLength() |
Expects the top object on the stack to be an array.
|
InstructionBuilder |
InstructionBuilder.boxPrimitive(java.lang.String typeName) |
If the type name is a primitive type, adds code to box the type into the equivalent wrapper type, using static
methods on the wrapper type.
|
InstructionBuilder |
InstructionBuilder.castOrUnbox(java.lang.String typeName) |
Casts the object on top of the stack to the indicated type.
|
InstructionBuilder |
InstructionBuilder.checkcast(java.lang.Class clazz) |
|
InstructionBuilder |
InstructionBuilder.checkcast(java.lang.String className) |
Adds a check that the object on top of the stack is assignable to the indicated class.
|
InstructionBuilder |
InstructionBuilder.compareSpecial(java.lang.String typeName) |
Special comparison logic for primitive float, double and long.
|
InstructionBuilder |
InstructionBuilder.doWhile(Condition condition,
WhileCallback callback) |
Implements a simple loop based on a condition.
|
InstructionBuilder |
InstructionBuilder.dupe() |
Duplicates the top object on the stack.
|
InstructionBuilder |
InstructionBuilder.dupe(int depth) |
Duplicates the top object on the stack, placing the result at some depth.
|
InstructionBuilder |
InstructionBuilder.dupeWide() |
Duplicates a wide value (a primitive long or double).
|
InstructionBuilder |
InstructionBuilder.getField(java.lang.String className,
java.lang.String fieldName,
java.lang.Class fieldType) |
Loads a field onto the stack.
|
InstructionBuilder |
InstructionBuilder.getField(java.lang.String className,
java.lang.String fieldName,
java.lang.String typeName) |
Loads an instance field onto the stack.
|
InstructionBuilder |
InstructionBuilder.getField(PlasticField field) |
Loads an instance or static field onto the stack.
|
InstructionBuilder |
InstructionBuilder.getStaticField(java.lang.String className,
java.lang.String fieldName,
java.lang.Class fieldType) |
Gets a static field; does not consume a value from the stack, but pushes the fields' value onto the stack.
|
InstructionBuilder |
InstructionBuilder.getStaticField(java.lang.String className,
java.lang.String fieldName,
java.lang.String typeName) |
Gets a static field; does not consume a value from the stack, but pushes the fields' value onto the stack.
|
InstructionBuilder |
InstructionBuilder.increment(LocalVariable variable) |
Increments a local integer variable.
|
InstructionBuilder |
InstructionBuilder.instanceOf(java.lang.Class clazz) |
Adds a check that the object on top of the stack is assignable to the indicated class.
|
InstructionBuilder |
InstructionBuilder.instanceOf(java.lang.String className) |
Adds a check that the object on top of the stack is assignable to the indicated class.
|
InstructionBuilder |
InstructionBuilder.invoke(java.lang.Class clazz,
java.lang.Class returnType,
java.lang.String methodName,
java.lang.Class... argumentTypes) |
Automatically invokes an interface or virtual method.
|
InstructionBuilder |
InstructionBuilder.invokeConstructor(java.lang.Class clazz,
java.lang.Class... argumentTypes) |
|
InstructionBuilder |
InstructionBuilder.invokeConstructor(java.lang.String className,
java.lang.String... argumentTypes) |
Invokes a constructor on a class.
|
InstructionBuilder |
InstructionBuilder.invokeInterface(java.lang.String interfaceName,
java.lang.String returnType,
java.lang.String methodName,
java.lang.String... argumentTypes) |
Invokes a standard virtual method.
|
InstructionBuilder |
InstructionBuilder.invokeSpecial(java.lang.String containingClassName,
MethodDescription description) |
Invokes an instance method of a base class, or a private method of a class, using the target object
and parameters already on the stack.
|
InstructionBuilder |
InstructionBuilder.invokeStatic(java.lang.Class clazz,
java.lang.Class returnType,
java.lang.String methodName,
java.lang.Class... argumentTypes) |
Invokes a static method of a class.
|
InstructionBuilder |
InstructionBuilder.invokeVirtual(java.lang.String className,
java.lang.String returnType,
java.lang.String methodName,
java.lang.String... argumentTypes) |
Invokes a standard virtual method.
|
InstructionBuilder |
InstructionBuilder.invokeVirtual(PlasticMethod method) |
|
InstructionBuilder |
InstructionBuilder.iterateArray(InstructionBuilderCallback callback) |
Expects an array to be the top value on the stack.
|
InstructionBuilder |
InstructionBuilder.loadArgument(int index) |
Loads an argument onto the stack, using the opcode appropriate to the argument's type.
|
InstructionBuilder |
InstructionBuilder.loadArguments() |
Loads all arguments for the current method onto the stack; this is used when invoking a method
that takes the exact same parameters (often, a super-class implementation).
|
InstructionBuilder |
InstructionBuilder.loadArrayElement() |
Loads a value from an array object.
|
InstructionBuilder |
InstructionBuilder.loadArrayElement(int index,
java.lang.String elementType) |
Loads a value from an array object, which must be the top element of the stack.
|
InstructionBuilder |
InstructionBuilder.loadConstant(java.lang.Object constant) |
Loads a constant value
|
InstructionBuilder |
InstructionBuilder.loadNull() |
Loads the null constant onto the stack.
|
InstructionBuilder |
InstructionBuilder.loadThis() |
Loads this onto the stack.
|
InstructionBuilder |
InstructionBuilder.loadTypeConstant(java.lang.Class type) |
Loads a Java type (a Class instance) as a constant.
|
InstructionBuilder |
InstructionBuilder.loadTypeConstant(java.lang.String typeName) |
Loads a Java type (a Class instance) as a constant.
|
InstructionBuilder |
InstructionBuilder.loadVariable(LocalVariable variable) |
Loads a value from a local variable and pushes it onto the stack.
|
InstructionBuilder |
InstructionBuilder.newInstance(java.lang.Class clazz) |
|
InstructionBuilder |
InstructionBuilder.newInstance(java.lang.String className) |
Creates a new, uninitialized instance of the indicated class.
|
InstructionBuilder |
InstructionBuilder.popWide() |
Pops a wide value (a primitive long or double).
|
InstructionBuilder |
InstructionBuilder.putField(java.lang.String className,
java.lang.String fieldName,
java.lang.Class fieldType) |
|
InstructionBuilder |
InstructionBuilder.putField(java.lang.String className,
java.lang.String fieldName,
java.lang.String typeName) |
Expects the stack to contain the instance to update, and the value to store into the field.
|
InstructionBuilder |
InstructionBuilder.putStaticField(java.lang.String className,
java.lang.String fieldName,
java.lang.Class fieldType) |
Sets a static field; the new field value should be on top of the stack.
|
InstructionBuilder |
InstructionBuilder.putStaticField(java.lang.String className,
java.lang.String fieldName,
java.lang.String typeName) |
Sets a static field; the new field value should be on top of the stack.
|
InstructionBuilder |
InstructionBuilder.returnDefaultValue() |
Returns the default value for the method, which may be null, or a specific primitive value.
|
InstructionBuilder |
InstructionBuilder.returnResult() |
Returns the top value on the stack.
|
InstructionBuilder |
InstructionBuilder.startSwitch(int min,
int max,
SwitchCallback callback) |
Starts a switch statement.
|
InstructionBuilder |
InstructionBuilder.storeVariable(LocalVariable variable) |
|
InstructionBuilder |
InstructionBuilder.swap() |
Swaps the top element of the stack with the next element down.
|
InstructionBuilder |
InstructionBuilder.throwException() |
Throws the exception on the top of the stack.
|
InstructionBuilder |
InstructionBuilder.throwException(java.lang.Class<? extends java.lang.Throwable> exceptionType,
java.lang.String message) |
|
InstructionBuilder |
InstructionBuilder.throwException(java.lang.String className,
java.lang.String message) |
Throws an exception with a fixed message.
|
InstructionBuilder |
InstructionBuilder.unboxPrimitive(java.lang.String typeName) |
Unboxes a wrapper type to a primitive type if typeName is a primitive type name (the value on the stack
should be the corresponding wrapper type instance).
|
InstructionBuilder |
InstructionBuilder.when(Condition condition,
InstructionBuilderCallback ifTrue) |
|
InstructionBuilder |
InstructionBuilder.when(Condition condition,
WhenCallback callback) |
Executes conditional code based on a Condition .
|