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
className
private ConstantHTML
constantHtml
private ConstantPool
constantPool
private java.util.BitSet
gotoSet
private java.io.PrintWriter
printWriter
private static boolean
wide
-
Constructor Summary
Constructors Constructor Description CodeHTML(java.lang.String dir, java.lang.String className, Method[] methods, ConstantPool constantPool, ConstantHTML constantHtml, java.nio.charset.Charset charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
codeToHTML(ByteSequence bytes, int methodNumber)
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 methodNumber)
Write a single method with the byte code associated with it.
-
-
-
Field Detail
-
wide
private static boolean wide
-
className
private final java.lang.String className
-
printWriter
private final java.io.PrintWriter printWriter
-
gotoSet
private java.util.BitSet gotoSet
-
constantPool
private final ConstantPool constantPool
-
constantHtml
private final ConstantHTML constantHtml
-
-
Constructor Detail
-
CodeHTML
CodeHTML(java.lang.String dir, java.lang.String className, Method[] methods, ConstantPool constantPool, ConstantHTML constantHtml, java.nio.charset.Charset charset) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
codeToHTML
private java.lang.String codeToHTML(ByteSequence bytes, int methodNumber) 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 methodNumber) throws java.io.IOException
Write a single method with the byte code associated with it.- Throws:
java.io.IOException
-
-