org.aspectj.org.eclipse.jdt.internal.core.util
Class Disassembler

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.core.util.ClassFileBytesDisassembler
      extended by org.aspectj.org.eclipse.jdt.internal.core.util.Disassembler

public class Disassembler
extends ClassFileBytesDisassembler

Disassembler of .class files. It generates an output in the Writer that looks close to the javap output.


Field Summary
 
Fields inherited from class org.aspectj.org.eclipse.jdt.core.util.ClassFileBytesDisassembler
COMPACT, DEFAULT, DETAILED, SYSTEM, WORKING_COPY
 
Constructor Summary
Disassembler()
           
 
Method Summary
 java.lang.String disassemble(byte[] classFileBytes, java.lang.String lineSeparator)
          Answers back the disassembled string of the classfile bytes using the default mode.
 java.lang.String disassemble(byte[] classFileBytes, java.lang.String lineSeparator, int mode)
          Answers back the disassembled string of the classfile bytes according to the mode.
 java.lang.String disassemble(IClassFileReader classFileReader, java.lang.String lineSeparator)
           
 java.lang.String disassemble(IClassFileReader classFileReader, java.lang.String lineSeparator, int mode)
          Answers back the disassembled string of the IClassFileReader according to the mode.
static java.lang.String escapeString(java.lang.String s)
           
 java.lang.String getDescription()
          Answers a readable short description of this disassembler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Disassembler

public Disassembler()
Method Detail

escapeString

public static java.lang.String escapeString(java.lang.String s)

disassemble

public java.lang.String disassemble(byte[] classFileBytes,
                                    java.lang.String lineSeparator)
                             throws ClassFormatException
Description copied from class: ClassFileBytesDisassembler
Answers back the disassembled string of the classfile bytes using the default mode. This is an output quite similar to the javap tool, using DEFAULT mode.

Specified by:
disassemble in class ClassFileBytesDisassembler
Parameters:
classFileBytes - The bytes of the classfile
lineSeparator - the line separator to use.
Returns:
the disassembled string of the IClassFileReader using the default mode.
Throws:
ClassFormatException - if the classfile bytes are ill-formed
See Also:
ClassFileBytesDisassembler.disassemble(byte[], java.lang.String)

disassemble

public java.lang.String disassemble(byte[] classFileBytes,
                                    java.lang.String lineSeparator,
                                    int mode)
                             throws ClassFormatException
Description copied from class: ClassFileBytesDisassembler
Answers back the disassembled string of the classfile bytes according to the mode. This is an output quite similar to the javap tool.

Specified by:
disassemble in class ClassFileBytesDisassembler
Parameters:
classFileBytes - The bytes of the classfile
lineSeparator - the line separator to use.
mode - the mode used to disassemble the IClassFileReader
Returns:
the disassembled string of the IClassFileReader according to the mode
Throws:
ClassFormatException - if the classfile bytes are ill-formed
See Also:
ClassFileBytesDisassembler.disassemble(byte[], java.lang.String, int)

disassemble

public java.lang.String disassemble(IClassFileReader classFileReader,
                                    java.lang.String lineSeparator)
See Also:
disassemble(org.aspectj.org.eclipse.jdt.core.util.IClassFileReader, java.lang.String, int)

disassemble

public java.lang.String disassemble(IClassFileReader classFileReader,
                                    java.lang.String lineSeparator,
                                    int mode)
Answers back the disassembled string of the IClassFileReader according to the mode. This is an output quite similar to the javap tool.

Parameters:
classFileReader - The classFileReader to be disassembled
lineSeparator - the line separator to use.
mode - the mode used to disassemble the IClassFileReader
Returns:
the disassembled string of the IClassFileReader according to the mode

getDescription

public java.lang.String getDescription()
Description copied from class: ClassFileBytesDisassembler
Answers a readable short description of this disassembler

Specified by:
getDescription in class ClassFileBytesDisassembler
Returns:
String - a string description of the disassembler
See Also:
ClassFileBytesDisassembler.getDescription()