Class CodeHTML


  • final class CodeHTML
    extends java.lang.Object
    Convert code into HTML file.
    • Constructor Summary

      Constructors 
      Constructor Description
      CodeHTML​(java.lang.String dir, java.lang.String class_name, Method[] methods, ConstantPool constant_pool, ConstantHTML constant_html)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.String codeToHTML​(ByteSequence bytes, int method_number)
      Disassemble a stream of byte codes and return the string representation.
      private void findGotos​(ByteSequence bytes, Code code)
      Find all target addresses in code, so that they can be marked with <A NAME = ...>.
      private void writeMethod​(Method method, int method_number)
      Write a single method with the byte code associated with it.
      • Methods inherited from class java.lang.Object

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

      • className

        private final java.lang.String className
      • file

        private final java.io.PrintWriter file
      • gotoSet

        private java.util.BitSet gotoSet
      • wide

        private static boolean wide
    • Constructor Detail

      • CodeHTML

        CodeHTML​(java.lang.String dir,
                 java.lang.String class_name,
                 Method[] methods,
                 ConstantPool constant_pool,
                 ConstantHTML constant_html)
          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • codeToHTML

        private java.lang.String codeToHTML​(ByteSequence bytes,
                                            int method_number)
                                     throws java.io.IOException
        Disassemble a stream of byte codes and return the string representation.
        Parameters:
        stream - data input stream
        Returns:
        String representation of byte code
        Throws:
        java.io.IOException
      • findGotos

        private void findGotos​(ByteSequence bytes,
                               Code code)
                        throws java.io.IOException
        Find all target addresses in code, so that they can be marked with <A NAME = ...>. Target addresses are kept in an BitSet object.
        Throws:
        java.io.IOException
      • writeMethod

        private void writeMethod​(Method method,
                                 int method_number)
                          throws java.io.IOException
        Write a single method with the byte code associated with it.
        Throws:
        java.io.IOException