Class InstructionPrinter

  • All Implemented Interfaces:
    Opcode

    public class InstructionPrinter
    extends java.lang.Object
    implements Opcode
    Simple utility class for printing the bytecode instructions of a method.
    Author:
    Jason T. Greene
    • Constructor Detail

      • InstructionPrinter

        public InstructionPrinter​(java.io.PrintStream stream)
        Constructs a InstructionPrinter object.
    • Method Detail

      • print

        public static void print​(CtMethod method,
                                 java.io.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 java.lang.String instructionString​(CodeIterator iter,
                                                         int pos,
                                                         ConstPool pool)
        Gets a string representation of the bytecode instruction at the specified position.