Class Disassembler

java.lang.Object
org.aspectj.org.eclipse.jdt.core.util.ClassFileBytesDisassembler
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.
  • Constructor Details

    • Disassembler

      public Disassembler()
  • Method Details

    • escapeString

      public static String escapeString(String s)
    • disassemble

      public String disassemble(byte[] classFileBytes, 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:
      • invalid reference
        org.eclipse.jdt.core.util.ClassFileBytesDisassembler#disassemble(byte[], java.lang.String)
    • disassemble

      public String disassemble(byte[] classFileBytes, 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:
      • invalid reference
        org.eclipse.jdt.core.util.ClassFileBytesDisassembler#disassemble(byte[], java.lang.String, int)
    • disassemble

    • disassemble

      public String disassemble(IClassFileReader classFileReader, 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 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:
      • invalid reference
        org.eclipse.jdt.core.util.ClassFileBytesDisassembler#getDescription()