Package org.apache.bcel.util
Class CodeHTML
- java.lang.Object
-
- org.apache.bcel.util.CodeHTML
-
final class CodeHTML extends java.lang.Object
Convert code into HTML file.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
class_name
private ConstantHTML
constant_html
private ConstantPool
constant_pool
private java.io.PrintWriter
file
private java.util.BitSet
goto_set
private static boolean
wide
-
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.
-
-
-
Field Detail
-
class_name
private final java.lang.String class_name
-
file
private final java.io.PrintWriter file
-
goto_set
private java.util.BitSet goto_set
-
constant_pool
private final ConstantPool constant_pool
-
constant_html
private final ConstantHTML constant_html
-
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
-
-