Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java Debug Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A virtual machine targeted for debugging. All other mirrors are associated with an instance of this interface. Access to global VM properties and control of VM execution are supported directly by this interface.
Field Summary | |
static int |
TRACE_ALL
All tracing is enabled. |
static int |
TRACE_EVENTS
Tracing enabled for internal event handling. |
static int |
TRACE_NONE
All tracing is disabled. |
static int |
TRACE_OBJREFS
Tracing enabled for internal management of object references. |
static int |
TRACE_RECEIVES
Tracing enabled for JDWP packets received from target VM. |
static int |
TRACE_REFTYPES
Tracing enabled for internal managment of reference types. |
static int |
TRACE_SENDS
Tracing enabled for JDWP packets sent to target VM. |
Method Summary | |
List |
allClasses()
Returns all loaded types. |
List |
allThreads()
Returns a list of the currently running threads. |
boolean |
canGetBytecodes()
Determines if this implementation supports the retrieval of a method's bytecodes. |
boolean |
canGetCurrentContendedMonitor()
Determines if this implementation supports the retrieval of the monitor for which a thread is currently waiting. |
boolean |
canGetMonitorInfo()
Determines if this implementation supports the retrieval of the monitor information for an object. |
boolean |
canGetOwnedMonitorInfo()
Determines if this implementation supports the retrieval of the monitors owned by a thread. |
boolean |
canGetSyntheticAttribute()
Determines if this implementation supports the query of the synthetic attribute of a method or field. |
boolean |
canWatchFieldAccess()
Determines if this implementation supports watchpoints for field access. |
boolean |
canWatchFieldModification()
Determines if this implementation supports watchpoints for field modification. |
List |
classesByName(String className)
Returns the loaded reference types that match a given name. |
String |
description()
Returns text information on the target VM and the debugger support that mirrors it. |
void |
dispose()
Invalidates this virtual machine mirror. |
EventQueue |
eventQueue()
Returns the event queue for this virtual machine. |
EventRequestManager |
eventRequestManager()
Returns the event request manager for this virtual machine. |
void |
exit(int exitCode)
Causes the mirrored VM to terminate with the given error code. |
BooleanValue |
mirrorOf(boolean value)
Creates a BooleanValue for the given value. |
ByteValue |
mirrorOf(byte value)
Creates a ByteValue for the given value. |
CharValue |
mirrorOf(char value)
Creates a CharValue for the given value. |
DoubleValue |
mirrorOf(double value)
Creates a DoubleValue for the given value. |
FloatValue |
mirrorOf(float value)
Creates a FloatValue for the given value. |
IntegerValue |
mirrorOf(int value)
Creates an IntegerValue for the given value. |
LongValue |
mirrorOf(long value)
Creates a LongValue for the given value. |
ShortValue |
mirrorOf(short value)
Creates a ShortValue for the given value. |
StringReference |
mirrorOf(String value)
Creates a string in this virtual machine. |
String |
name()
Returns the name of the target VM as reported by the property java.vm.name . |
Process |
process()
Returns the Process object for this
virtual machine if launched
by a LaunchingConnector |
void |
resume()
Continues the execution of the application running in this virtual machine. |
void |
setDebugTraceMode(int traceFlags)
Traces the activities performed by the com.sun.jdi implementation. |
void |
suspend()
Suspends the execution of the application running in this virtual machine. |
List |
topLevelThreadGroups()
Returns each thread group which does not have a parent. |
String |
version()
Returns the version of the Java Runtime Environment in the target VM as reported by the property java.version . |
Methods inherited from interface com.sun.jdi.Mirror |
toString, virtualMachine |
Field Detail |
public static final int TRACE_NONE
public static final int TRACE_SENDS
public static final int TRACE_RECEIVES
public static final int TRACE_EVENTS
public static final int TRACE_REFTYPES
public static final int TRACE_OBJREFS
public static final int TRACE_ALL
Method Detail |
public List classesByName(String className)
ReferenceType
for each class
or interface found with the given name. The search
is confined to loaded classes only; no attempt is made
to load a class of the given name.
The returned list will include reference types loaded at least to the point of preparation and types (like array) for which preparation is not defined.
className
- the class/interface name to search forReferenceType
objects, each
mirroring a type in the target VM with the given name.public List allClasses()
ReferenceType
will be placed in the returned list.
The list will include ReferenceTypes which mirror classes,
interfaces, and array types.
The returned list will include reference types loaded at least to the point of preparation and types (like array) for which preparation is not defined.
ReferenceType
objects, each mirroring
a loaded type in the target VM.public List allThreads()
ThreadReference
that mirrors it is placed in the list.
The returned list contains threads created through
java.lang.Thread, all native threads attached to
the target VM through JNI, and system threads created
by the target VM. Thread objects that have not yet been started
(see java.lang.Thread#start
) and thread objects that have
completed their execution are not included in the returned list.ThreadReference
objects, one for each
running thread in the mirrored VM.public void suspend()
Unlike java.lang.Thread#suspend
,
suspends of both the virtual machine and individual threads are
counted. Before a thread will run again, it must be resumed
(through resume()
or ThreadReference.resume()
)
the same number of times it has been suspended.
public void resume()
ThreadReference.resume()
.suspend()
public List topLevelThreadGroups()
ThreadGroupReference
is placed in the
returned list.
This command may be used as the first step in building a tree (or trees) of the existing thread groups.
ThreadGroupReference
objects, one for each
top level thread group.public EventQueue eventQueue()
EventQueue
object, this
method will return the same instance each time it
is invoked.EventQueue
for this virtual machine.public EventRequestManager eventRequestManager()
EventRequestManager
controls user settable events
such as breakpoints.
A virtual machine has only one EventRequestManager
object,
this method will return the same instance each time it
is invoked.EventRequestManager
for this virtual machine.public BooleanValue mirrorOf(boolean value)
BooleanValue
for the given value. This value
can be used for setting and comparing against a value retrieved
from a variable or field in this virtual machine.value
- a boolean for which to create the valueBooleanValue
for the given boolean.public ByteValue mirrorOf(byte value)
ByteValue
for the given value. This value
can be used for setting and comparing against a value retrieved
from a variable or field in this virtual machine.value
- a byte for which to create the valueByteValue
for the given byte.public CharValue mirrorOf(char value)
CharValue
for the given value. This value
can be used for setting and comparing against a value retrieved
from a variable or field in this virtual machine.value
- a char for which to create the valueCharValue
for the given char.public ShortValue mirrorOf(short value)
ShortValue
for the given value. This value
can be used for setting and comparing against a value retrieved
from a variable or field in this virtual machine.value
- a short for which to create the valueShortValue
for the given short.public IntegerValue mirrorOf(int value)
IntegerValue
for the given value. This value
can be used for setting and comparing against a value retrieved
from a variable or field in this virtual machine.value
- an int for which to create the valueIntegerValue
for the given int.public LongValue mirrorOf(long value)
LongValue
for the given value. This value
can be used for setting and comparing against a value retrieved
from a variable or field in this virtual machine.value
- a long for which to create the valueLongValue
for the given long.public FloatValue mirrorOf(float value)
FloatValue
for the given value. This value
can be used for setting and comparing against a value retrieved
from a variable or field in this virtual machine.value
- a float for which to create the valueFloatValue
for the given float.public DoubleValue mirrorOf(double value)
DoubleValue
for the given value. This value
can be used for setting and comparing against a value retrieved
from a variable or field in this virtual machine.value
- a double for which to create the valueDoubleValue
for the given double.public StringReference mirrorOf(String value)
the
- string to be createdStringReference
that mirrors the newly created
string in the target VM.public Process process()
Process
object for this
virtual machine if launched
by a LaunchingConnector
Process
object for this virtual
machine, or null if it was not launched by a
LaunchingConnector
.public void dispose()
suspend()
or by
ThreadReference.suspend()
are resumed as many
times as necessary for them to run.
ObjectReference.disableCollection()
.
Resources originating in this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) will become invalid.
public void exit(int exitCode)
Threads running in the mirrored VM are abruptly terminated. A thread death exception is not thrown and finally blocks are not run.
exitCode
- the exit code for the target VM.public boolean canWatchFieldModification()
true
if the feature is supported,
false
otherwise.public boolean canWatchFieldAccess()
true
if the feature is supported,
false
otherwise.public boolean canGetBytecodes()
true
if the feature is supported,
false
otherwise.public boolean canGetSyntheticAttribute()
true
if the feature is supported,
false
otherwise.public boolean canGetOwnedMonitorInfo()
true
if the feature is supported,
false
otherwise.public boolean canGetCurrentContendedMonitor()
true
if the feature is supported,
false
otherwise.public boolean canGetMonitorInfo()
true
if the feature is supported,
false
otherwise.public String description()
version()
, VirtualMachineManager.majorInterfaceVersion()
,
and VirtualMachineManager.minorInterfaceVersion()
public String version()
java.version
.
For obtaining the JDI interface version, use
VirtualMachineManager.majorInterfaceVersion()
and VirtualMachineManager.minorInterfaceVersion()
public String name()
java.vm.name
.public void setDebugTraceMode(int traceFlags)
Output is implementation dependent and trace mode may be ignored.
traceFlags
- identifies which kinds of tracing to enable.
|
Java Debug Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |