Class InstructionPrinter

java.lang.Object
javassist.bytecode.InstructionPrinter
All Implemented Interfaces:
Opcode

public class InstructionPrinter extends Object implements Opcode
Simple utility class for printing the bytecode instructions of a method.
  • Field Details

    • opcodes

      private static final String[] opcodes
    • stream

      private final PrintStream stream
  • Constructor Details

    • InstructionPrinter

      public InstructionPrinter(PrintStream stream)
      Constructs a InstructionPrinter object.
  • Method Details

    • print

      public static void print(CtMethod method, PrintStream stream)
      Prints the bytecode instructions of a given method.
    • print

      public void print(CtMethod method)
      Prints the bytecode instructions of a given method.
    • instructionString

      public static String instructionString(CodeIterator iter, int pos, ConstPool pool)
      Gets a string representation of the bytecode instruction at the specified position.
    • wide

      private static String wide(CodeIterator iter, int pos)
    • arrayInfo

      private static String arrayInfo(int type)
    • classInfo

      private static String classInfo(ConstPool pool, int index)
    • interfaceMethodInfo

      private static String interfaceMethodInfo(ConstPool pool, int index)
    • methodInfo

      private static String methodInfo(ConstPool pool, int index)
    • fieldInfo

      private static String fieldInfo(ConstPool pool, int index)
    • lookupSwitch

      private static String lookupSwitch(CodeIterator iter, int pos)
    • tableSwitch

      private static String tableSwitch(CodeIterator iter, int pos)
    • ldc

      private static String ldc(ConstPool pool, int index)