APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.bcel.internal.util

pack-priv final Class CodeHTML

extends Object
Class Inheritance
Imports
java.io.IOException, .PrintWriter, java.nio.charset.Charset, java.util.BitSet, com.sun.org.apache.bcel.internal.Const, com.sun.org.apache.bcel.internal.classfile.Attribute, .Code, .CodeException, .ConstantFieldref, .ConstantInterfaceMethodref, .ConstantInvokeDynamic, .ConstantMethodref, .ConstantNameAndType, .ConstantPool, .LocalVariableTable, .Method, .Utility

Convert code into HTML file.

Field Summary

Modifier and TypeField and Description
private final String
private final ConstantHTML
private final ConstantPool
private BitSet
private final PrintWriter
private static boolean

Constructor Summary

AccessConstructor and Description
pack-priv
CodeHTML(final String dir, final String className, final Method[] methods, final ConstantPool constantPool, final ConstantHTML constantHtml, final Charset charset)

Method Summary

Modifier and TypeMethod and Description
private String

Returns:

String representation of byte code
codeToHTML
(final ByteSequence bytes, final int methodNumber)

Disassemble a stream of byte codes and return the string representation.

private void
findGotos(final ByteSequence bytes, final Code code)

Find all target addresses in code, so that they can be marked with <A NAME = ...

private void
writeMethod(final Method method, final int methodNumber)

Write a single method with the byte code associated with it.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classNameback to summary
private final String className
constantHtmlback to summary
private final ConstantHTML constantHtml
constantPoolback to summary
private final ConstantPool constantPool
gotoSetback to summary
private BitSet gotoSet
printWriterback to summary
private final PrintWriter printWriter
wideback to summary
private static boolean wide

Constructor Detail

CodeHTMLback to summary
pack-priv CodeHTML(final String dir, final String className, final Method[] methods, final ConstantPool constantPool, final ConstantHTML constantHtml, final Charset charset) throws IOException

Method Detail

codeToHTMLback to summary
private String codeToHTML(final ByteSequence bytes, final int methodNumber) throws IOException

Disassemble a stream of byte codes and return the string representation.

Returns:String

String representation of byte code

findGotosback to summary
private void findGotos(final ByteSequence bytes, final Code code) throws IOException

Find all target addresses in code, so that they can be marked with <A NAME = ...>. Target addresses are kept in an BitSet object.

writeMethodback to summary
private void writeMethod(final Method method, final int methodNumber) throws IOException

Write a single method with the byte code associated with it.