Top Description Fields Constructors Methods
javassist.bytecode

public Class InstructionPrinter

extends Object
implements Opcode
Class Inheritance
All Implemented Interfaces
javassist.bytecode.Opcode
Imports
java.io.PrintStream, javassist.CtMethod

Simple utility class for printing the bytecode instructions of a method.
Author
Jason T. Greene

Field Summary

Modifier and TypeField and Description
private static final String[]
private final PrintStream

Constructor Summary

AccessConstructor and Description
public
InstructionPrinter(PrintStream stream)

Constructs a InstructionPrinter object.

Method Summary

Modifier and TypeMethod and Description
private static String
arrayInfo(int type)

private static String
classInfo(ConstPool pool, int index)

private static String
fieldInfo(ConstPool pool, int index)

public static String
instructionString(CodeIterator iter, int pos, ConstPool pool)

Gets a string representation of the bytecode instruction at the specified position.

private static String
interfaceMethodInfo(ConstPool pool, int index)

private static String
ldc(ConstPool pool, int index)

private static String
lookupSwitch(CodeIterator iter, int pos)

private static String
methodInfo(ConstPool pool, int index)

private static String
tableSwitch(CodeIterator iter, int pos)

private static String
wide(CodeIterator iter, int pos)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

opcodesback to summary
private static final String[] opcodes
streamback to summary
private final PrintStream stream

Constructor Detail

InstructionPrinterback to summary
public InstructionPrinter(PrintStream stream)

Constructs a InstructionPrinter object.

Method Detail

arrayInfoback to summary
private static String arrayInfo(int type)
classInfoback to summary
private static String classInfo(ConstPool pool, int index)
fieldInfoback to summary
private static String fieldInfo(ConstPool pool, int index)
instructionStringback to summary
public static String instructionString(CodeIterator iter, int pos, ConstPool pool)

Gets a string representation of the bytecode instruction at the specified position.

interfaceMethodInfoback to summary
private static String interfaceMethodInfo(ConstPool pool, int index)
ldcback to summary
private static String ldc(ConstPool pool, int index)
lookupSwitchback to summary
private static String lookupSwitch(CodeIterator iter, int pos)
methodInfoback to summary
private static String methodInfo(ConstPool pool, int index)
tableSwitchback to summary
private static String tableSwitch(CodeIterator iter, int pos)
wideback to summary
private static String wide(CodeIterator iter, int pos)