| java.lang.Object org.cojen.classfile.AbstractCodeAssembler org.cojen.classfile.CodeAssemblerPrinter
CodeAssemblerPrinter | public class CodeAssemblerPrinter extends AbstractCodeAssembler implements CodeAssembler(Code) | | CodeAssembler implementation that prints out instructions using a Java-like
syntax that matches the methods of CodeAssembler. When used in conjunction
with a
CodeDisassembler , this class makes it easier to understand
how to use a CodeAssembler.
author: Brian S O'Neill |
Method Summary | |
public void | arrayLength() | public void | branch(Location location) | public void | breakpoint() | public void | checkCast(TypeDesc type) | public void | convert(TypeDesc fromType, TypeDesc toType) | public void | convert(TypeDesc fromType, TypeDesc toType, int fpConvertMode) | public Label | createLabel() | public LocalVariable | createLocalVariable(String name, TypeDesc type) | public void | dup() | public void | dup2() | public void | dup2X1() | public void | dup2X2() | public void | dupX1() | public void | dupX2() | static String | escape(String value) | static String | escape(String value, boolean forChar) | public void | exceptionHandler(Location startLocation, Location endLocation, String catchClassName) | public LocalVariable | getParameter(int index) | public int | getParameterCount() | public void | ifComparisonBranch(Location location, String choice) | public void | ifEqualBranch(Location location, boolean choice) | public void | ifNullBranch(Location location, boolean choice) | public void | ifZeroComparisonBranch(Location location, String choice) | public void | instanceOf(TypeDesc type) | public void | integerIncrement(LocalVariable local, int amount) | public void | invokeConstructor(TypeDesc[] params) | public void | invokeConstructor(String className, TypeDesc[] params) | public void | invokeConstructor(TypeDesc classDesc, TypeDesc[] params) | public void | invokeInterface(String className, String methodName, TypeDesc ret, TypeDesc[] params) | public void | invokeInterface(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params) | public void | invokePrivate(String methodName, TypeDesc ret, TypeDesc[] params) | public void | invokeStatic(String methodName, TypeDesc ret, TypeDesc[] params) | public void | invokeStatic(String className, String methodName, TypeDesc ret, TypeDesc[] params) | public void | invokeStatic(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params) | public void | invokeSuper(String superClassName, String methodName, TypeDesc ret, TypeDesc[] params) | public void | invokeSuper(TypeDesc superClassDesc, String methodName, TypeDesc ret, TypeDesc[] params) | public void | invokeSuperConstructor(TypeDesc[] params) | public void | invokeVirtual(String methodName, TypeDesc ret, TypeDesc[] params) | public void | invokeVirtual(String className, String methodName, TypeDesc ret, TypeDesc[] params) | public void | invokeVirtual(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params) | public void | jsr(Location location) | public void | loadConstant(String value) | public void | loadConstant(TypeDesc type) | public void | loadConstant(boolean value) | public void | loadConstant(int value) | public void | loadConstant(long value) | public void | loadConstant(float value) | public void | loadConstant(double value) | public void | loadField(String fieldName, TypeDesc type) | public void | loadField(String className, String fieldName, TypeDesc type) | public void | loadField(TypeDesc classDesc, String fieldName, TypeDesc type) | public void | loadFromArray(TypeDesc type) | public void | loadLocal(LocalVariable local) | public void | loadNull() | public void | loadStaticField(String fieldName, TypeDesc type) | public void | loadStaticField(String className, String fieldName, TypeDesc type) | public void | loadStaticField(TypeDesc classDesc, String fieldName, TypeDesc type) | public void | loadThis() | public void | mapLineNumber(int lineNumber) | public void | math(byte opcode) | public void | monitorEnter() | public void | monitorExit() | public void | newObject(TypeDesc type) | public void | newObject(TypeDesc type, int dimensions) | public void | nop() | public void | pop() | public void | pop2() | public void | ret(LocalVariable local) | public void | returnValue(TypeDesc type) | public void | returnVoid() | public void | storeField(String fieldName, TypeDesc type) | public void | storeField(String className, String fieldName, TypeDesc type) | public void | storeField(TypeDesc classDesc, String fieldName, TypeDesc type) | public void | storeLocal(LocalVariable local) | public void | storeStaticField(String fieldName, TypeDesc type) | public void | storeStaticField(String className, String fieldName, TypeDesc type) | public void | storeStaticField(TypeDesc classDesc, String fieldName, TypeDesc type) | public void | storeToArray(TypeDesc type) | public void | swap() | public void | swap2() | public void | switchBranch(int[] cases, Location[] locations, Location defaultLocation) | public void | throwObject() |
CodeAssemblerPrinter | public CodeAssemblerPrinter(TypeDesc[] paramTypes, boolean isStatic, PrintWriter writer, String linePrefix, String lineSuffix, String builder)(Code) | | Parameters: linePrefix - optional prefix for each line Parameters: lineSuffix - optional suffix for each line Parameters: builder - when specified, generated method calls are invoked onlocal variable by this name |
arrayLength | public void arrayLength()(Code) | | |
breakpoint | public void breakpoint()(Code) | | |
dup2X1 | public void dup2X1()(Code) | | |
dup2X2 | public void dup2X2()(Code) | | |
dupX1 | public void dupX1()(Code) | | |
dupX2 | public void dupX2()(Code) | | |
getParameterCount | public int getParameterCount()(Code) | | |
ifEqualBranch | public void ifEqualBranch(Location location, boolean choice)(Code) | | |
ifNullBranch | public void ifNullBranch(Location location, boolean choice)(Code) | | |
invokeConstructor | public void invokeConstructor(TypeDesc[] params)(Code) | | |
invokeSuperConstructor | public void invokeSuperConstructor(TypeDesc[] params)(Code) | | |
loadConstant | public void loadConstant(boolean value)(Code) | | |
loadConstant | public void loadConstant(int value)(Code) | | |
loadConstant | public void loadConstant(long value)(Code) | | |
loadConstant | public void loadConstant(float value)(Code) | | |
loadConstant | public void loadConstant(double value)(Code) | | |
loadNull | public void loadNull()(Code) | | |
loadThis | public void loadThis()(Code) | | |
mapLineNumber | public void mapLineNumber(int lineNumber)(Code) | | |
math | public void math(byte opcode)(Code) | | |
monitorEnter | public void monitorEnter()(Code) | | |
monitorExit | public void monitorExit()(Code) | | |
returnVoid | public void returnVoid()(Code) | | |
swap2 | public void swap2()(Code) | | |
throwObject | public void throwObject()(Code) | | |
|
|