APIdia Launch Partner
Top Description Inners Methods
com.sun.tools.javap

public Interface DisassemblerTool

extends Tool, OptionChecker
Imports
java.io.Writer, java.nio.charset.Charset, java.util.Locale, java.util.concurrent.Callable, javax.tools.Diagnostic, .DiagnosticListener, .JavaFileManager, .JavaFileObject, .OptionChecker, .StandardJavaFileManager, .StandardLocation, .Tool

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

This is NOT part of any supported API. 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 and Inner Type Summary

Modifier and TypeClass and Description
public static interface
DisassemblerTool.DisassemblerTask

Interface representing a future for a disassembly task.

Method Summary

Modifier and TypeMethod and Description
public StandardJavaFileManager

Returns:

the standard file manager
getStandardFileManager
(DiagnosticListener<? super JavaFileObject>
a diagnostic listener for non-fatal diagnostics; if null use the compiler's default method for reporting diagnostics
diagnosticListener
,
Locale
the locale to apply when formatting diagnostics; null means the default locale.
locale
,
Charset
the character set used for decoding bytes; if null use the platform default
charset
)

Returns a new instance of the standard file manager implementation for this tool.

public DisassemblerTool.DisassemblerTask

Returns:

a task to perform the disassembly
getTask
(Writer
a Writer for additional output from the compiler; use System.err if null
out
,
JavaFileManager
a file manager; if null use the compiler's standard filemanager
fileManager
,
DiagnosticListener<? super JavaFileObject>
a diagnostic listener; if null use the compiler's default method for reporting diagnostics
diagnosticListener
,
Iterable<String>
compiler options, null means no options
options
,
Iterable<String>
class names (for annotation processing), null means no class names
classes
)

Creates a future for a disassembly task with the given components and arguments.

Inherited from javax.tools.OptionChecker:
isSupportedOption
Inherited from javax.tools.Tool:
getSourceVersionsnamerun

Method Detail

getStandardFileManagerback to summary
public StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)

Returns 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:DiagnosticListener<? super JavaFileObject>

a diagnostic listener for non-fatal diagnostics; if null use the compiler's default method for reporting diagnostics

locale:Locale

the locale to apply when formatting diagnostics; null means the default locale.

charset:Charset

the character set used for decoding bytes; if null use the platform default

Returns:StandardJavaFileManager

the standard file manager

getTaskback to summary
public DisassemblerTool.DisassemblerTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<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:Writer

a Writer for additional output from the compiler; use System.err if null

fileManager:JavaFileManager

a file manager; if null use the compiler's standard filemanager

diagnosticListener:DiagnosticListener<? super JavaFileObject>

a diagnostic listener; if null use the compiler's default method for reporting diagnostics

options:Iterable<String>

compiler options, null means no options

classes:Iterable<String>

class names (for annotation processing), null means no class names

Returns:DisassemblerTool.DisassemblerTask

a task to perform the disassembly

Exceptions
RuntimeException:
if an unrecoverable error occurred in a user supplied component. The cause will be the error in user code.
IllegalArgumentException:
if any of the given compilation units are of other kind than source
com.sun.tools.javap back to summary

public Interface DisassemblerTool.DisassemblerTask

extends Callable<Boolean>
Known Direct Implementers
com.sun.tools.javap.JavapTask

Interface representing a future for a disassembly task. The task has not yet started. To start the task, call the call method.

Before calling the call method, additional aspects of the task can be configured, for example, by calling the setLocale method.

Method Summary

Modifier and TypeMethod and Description
public Boolean

Returns:

true if and only all the files compiled without errors; false otherwise
call
()

Redeclares java.util.concurrent.Callable.call.

Performs this compilation task.

public void
setLocale(Locale
the locale to apply; null means apply no locale
locale
)

Set the locale to be applied when formatting diagnostics and other localized data.

Method Detail

callback to summary
public Boolean call()

Redeclares java.util.concurrent.Callable.call.

Performs this compilation task. The compilation may only be performed once. Subsequent calls to this method throw IllegalStateException.

Returns:Boolean

true if and only all the files compiled without errors; false otherwise

Exceptions
RuntimeException:
if an unrecoverable error occurred in a user-supplied component. The cause will be the error in user code.
IllegalStateException:
if called more than once
setLocaleback to summary
public void setLocale(Locale locale)

Set the locale to be applied when formatting diagnostics and other localized data.

Parameters
locale:Locale

the locale to apply; null means apply no locale

Exceptions
IllegalStateException:
if the task has started