Package org.apache.bcel.util
Class CodeHTML
java.lang.Object
org.apache.bcel.util.CodeHTML
Convert code into HTML file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final ConstantHTMLprivate final ConstantPoolprivate BitSetprivate final PrintWriterprivate static boolean -
Constructor Summary
ConstructorsConstructorDescriptionCodeHTML(String dir, String className, Method[] methods, ConstantPool constantPool, ConstantHTML constantHtml, Charset charset) -
Method Summary
Modifier and TypeMethodDescriptionprivate StringcodeToHTML(ByteSequence bytes, int methodNumber) Disassemble a stream of byte codes and return the string representation.private voidfindGotos(ByteSequence bytes, Code code) Find all target addresses in code, so that they can be marked with <A NAME = ...>.private voidwriteMethod(Method method, int methodNumber) Write a single method with the byte code associated with it.
-
Field Details
-
wide
private static boolean wide -
className
-
printWriter
-
gotoSet
-
constantPool
-
constantHtml
-
-
Constructor Details
-
CodeHTML
CodeHTML(String dir, String className, Method[] methods, ConstantPool constantPool, ConstantHTML constantHtml, Charset charset) throws IOException - Throws:
IOException
-
-
Method Details
-
codeToHTML
Disassemble a stream of byte codes and return the string representation.- Parameters:
stream- data input stream- Returns:
- String representation of byte code
- Throws:
IOException
-
findGotos
Find all target addresses in code, so that they can be marked with <A NAME = ...>. Target addresses are kept in an BitSet object.- Throws:
IOException
-
writeMethod
Write a single method with the byte code associated with it.- Throws:
IOException
-