com.sun.tools.javap
Interface DisassemblerTool

All Superinterfaces:
OptionChecker, Tool

public interface DisassemblerTool
extends Tool, OptionChecker

This class is intended to be put in javax.tools.

Since:
1.6

This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

See Also:
DiagnosticListener, Diagnostic, JavaFileManager

Nested Class Summary
static interface DisassemblerTool.DisassemblerTask
          Interface representing a future for a disassembly task.
 
Method Summary
 StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, java.util.Locale locale, java.nio.charset.Charset charset)
          Gets a new instance of the standard file manager implementation for this tool.
 DisassemblerTool.DisassemblerTask getTask(java.io.Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, java.lang.Iterable<java.lang.String> options, java.lang.Iterable<java.lang.String> classes)
          Creates a future for a disassembly task with the given components and arguments.
 
Methods inherited from interface javax.tools.Tool
getSourceVersions, run
 
Methods inherited from interface javax.tools.OptionChecker
isSupportedOption
 

Method Detail

getTask

DisassemblerTool.DisassemblerTask getTask(java.io.Writer out,
                                          JavaFileManager fileManager,
                                          DiagnosticListener<? super JavaFileObject> diagnosticListener,
                                          java.lang.Iterable<java.lang.String> options,
                                          java.lang.Iterable<java.lang.String> classes)
Creates a future for a disassembly task with the given components and arguments. The task might not have completed as described in the DissemblerTask interface.

If a file manager is provided, it must be able to handle all locations defined in StandardLocation.

Parameters:
out - a Writer for additional output from the compiler; use System.err if null
fileManager - a file manager; if null use the compiler's standard filemanager
diagnosticListener - a diagnostic listener; if null use the compiler's default method for reporting diagnostics
options - compiler options, null means no options
classes - class names (for annotation processing), null means no class names
compilationUnits - the compilation units to compile, null means no compilation units
Returns:
an object representing the compilation
Throws:
java.lang.RuntimeException - if an unrecoverable error occurred in a user supplied component. The cause will be the error in user code.
java.lang.IllegalArgumentException - if any of the given compilation units are of other kind than source

getStandardFileManager

StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener,
                                               java.util.Locale locale,
                                               java.nio.charset.Charset charset)
Gets a new instance of the standard file manager implementation for this tool. The file manager will use the given diagnostic listener for producing any non-fatal diagnostics. Fatal errors will be signalled with the appropriate exceptions.

The standard file manager will be automatically reopened if it is accessed after calls to flush or close. The standard file manager must be usable with other tools.

Parameters:
diagnosticListener - a diagnostic listener for non-fatal diagnostics; if null use the compiler's default method for reporting diagnostics
locale - the locale to apply when formatting diagnostics; null means the default locale.
charset - the character set used for decoding bytes; if null use the platform default
Returns:
the standard file manager