org.cojen.classfile
Class DisassemblyTool

java.lang.Object
  extended by org.cojen.classfile.DisassemblyTool

public class DisassemblyTool
extends Object

Disassembles a class file, sending the results to standard out. The class can be specified by name or by a file name. If the class is specified by name, it must be available in the classpath.

Two output formats are supported: assembly and builder. The assembly format is the default, and it produces a pseudo Java source file, where the method bodies contain JVM assembly code.

The builder format produces a valid Java file, which uses the Cojen classfile API. When compiled and run, it rebuilds the original class and inner classes. This format makes it easier to understand how to use the classfile API to generate new classes.

Author:
Brian S O'Neill

Nested Class Summary
static interface DisassemblyTool.Printer
           
 
Constructor Summary
DisassemblyTool()
           
 
Method Summary
static void main(String[] args)
          Disassembles a class file, sending the results to standard out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisassemblyTool

public DisassemblyTool()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Disassembles a class file, sending the results to standard out.
 DisassemblyTool [-f <format style>] <file or class name>
 
The format style may be "assembly" (the default) or "builder".

Throws:
Exception


Copyright © 2004-2011 Brian S O'Neill. All Rights Reserved.