Class Disassembler


  • public class Disassembler
    extends java.lang.Object
    This is a very simple component to disassemble a ShrikeBT method. The disassembly is just the list of ShrikeBT instructions, annotated with exception handler blocks and the mapping back to the original bytecodes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void disassembleTo​(java.io.Writer w)
      Write the disassembly to a stream.
      void disassembleTo​(java.lang.String prefix, java.io.Writer w)
      Write the disassembly to a stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Disassembler

        public Disassembler​(IInstruction[] instructions,
                            ExceptionHandler[][] handlers,
                            int[] instructionsToBytecodes)
        Create a disassembler for a method.
      • Disassembler

        public Disassembler​(MethodData data)
                     throws java.lang.NullPointerException
        Create a disassembler for a method.
        Throws:
        java.lang.NullPointerException - if data is null
    • Method Detail

      • disassembleTo

        public void disassembleTo​(java.lang.String prefix,
                                  java.io.Writer w)
                           throws java.io.IOException
        Write the disassembly to a stream. Each line is prefixed with 'prefix'.
        Throws:
        java.io.IOException
      • disassembleTo

        public void disassembleTo​(java.io.Writer w)
                           throws java.io.IOException
        Write the disassembly to a stream.
        Throws:
        java.io.IOException