public interface IJavaDebugTarget extends IDebugTarget, IStepFilters
IDebugTarget
,
IAdaptable
Modifier and Type | Method and Description |
---|---|
void |
addHotCodeReplaceListener(IJavaHotCodeReplaceListener listener)
Adds the given listener to this target for hot code replace
notifications.
|
IJavaVariable |
findVariable(String variableName)
Searches for and returns a variable with the given name, or
null if unable to resolve a variable with the name. |
IJavaThreadGroup[] |
getAllThreadGroups()
Returns all thread groups in this target.
|
String |
getDefaultStratum()
Return the default stratum used in this the target, or
null
to indicate a per-class default stratum. |
IJavaType[] |
getJavaTypes(String name)
Returns the types loaded in this debug target with the given fully
qualified name, or
null of no type with the given name is
loaded. |
int |
getRequestTimeout()
Returns the timeout value for JDI requests in milliseconds, or -1 if not
supported.
|
IJavaThreadGroup[] |
getRootThreadGroups()
Returns the top level thread groups in this target.
|
String[] |
getStepFilters()
Returns the list of active step filters in this target.
|
String |
getVersion()
Returns the version of the underlying virtual machine as defined by the
system property
java.version . |
String |
getVMName()
Returns the name of the underlying virtual machine as defined by the
system property
java.vm.name . |
boolean |
isFilterConstructors()
Returns whether constructors are filtered when stepping, if step filters
are enabled.
|
boolean |
isFilterGetters()
Returns whether simple getters are filtered when stepping.
|
boolean |
isFilterSetters()
Returns whether simple setters are filtered when stepping.
|
boolean |
isFilterStaticInitializers()
Returns whether static initializers are filtered when stepping, if step
filters are enabled.
|
boolean |
isFilterSynthetics()
Returns whether synthetic methods are filtered when stepping, if step
filters are enabled.
|
boolean |
isOutOfSynch()
Returns whether any of the threads associated with this debug target are
running code in the VM that is out of synch with the code in the
workspace.
|
boolean |
isPerformingHotCodeReplace()
Returns whether this target is currently performing a hot code replace.
|
boolean |
isStepThruFilters()
Returns whether a step that lands in a filtered location should proceed
through to an un-filtered location or return to the location where a step
originated.
|
boolean |
mayBeOutOfSynch()
Returns whether any of the threads associated with this debug target may
be running code in the VM that is out of synch with the code in the
workspace.
|
IJavaValue |
newValue(boolean value)
Returns a value from this target that corresponds to the given boolean.
|
IJavaValue |
newValue(byte value)
Returns a value from this target that corresponds to the given byte.
|
IJavaValue |
newValue(char value)
Returns a value from this target that corresponds to the given char.
|
IJavaValue |
newValue(double value)
Returns a value from this target that corresponds to the given double.
|
IJavaValue |
newValue(float value)
Returns a value from this target that corresponds to the given float.
|
IJavaValue |
newValue(int value)
Returns a value from this target that corresponds to the given int.
|
IJavaValue |
newValue(long value)
Returns a value from this target that corresponds to the given long.
|
IJavaValue |
newValue(short value)
Returns a value from this target that corresponds to the given short.
|
IJavaValue |
newValue(String value)
Returns a value from this target that corresponds to the given string.
|
IJavaValue |
nullValue()
Returns a value from this target that corresponds to
null . |
void |
refreshState()
Refreshes the state of the Java debug model elements (client) with the
current state of the debug target.
|
void |
removeHotCodeReplaceListener(IJavaHotCodeReplaceListener listener)
Removes the given listener from this target.
|
byte[] |
sendCommand(byte commandSet,
byte commandId,
byte[] data)
Sends a JDWP command to the back end and returns the JDWP reply packet as
bytes.
|
void |
setDefaultStratum(String stratum)
Set the default stratum used in this debug target.
|
void |
setFilterConstructors(boolean filter)
Sets whether to filter constructors when stepping.
|
void |
setFilterGetters(boolean filter)
Sets whether simple getters are filtered when stepping.
|
void |
setFilterSetters(boolean filter)
Sets whether simple setters are filtered when stepping.
|
void |
setFilterStaticInitializers(boolean filter)
Sets whether to filter static initializers when stepping.
|
void |
setFilterSynthetics(boolean filter)
Sets whether synthetic methods are filtered when stepping.
|
void |
setRequestTimeout(int timeout)
Sets the timeout value for JDI requests in milliseconds.
|
void |
setStepFilters(String[] list)
Sets the list of active step filters in this target.
|
void |
setStepThruFilters(boolean thru)
Sets whether a step that lands in a filtered location should continue
through to an un-filtered location, or return to where the step
originated.
|
boolean |
supportsAccessWatchpoints()
Returns whether this target supports access watchpoints.
|
boolean |
supportsForceReturn()
Returns whether this VM supports the ability to force an early return
from methods.
|
boolean |
supportsHotCodeReplace()
Returns whether this target supports hot code replace.
|
boolean |
supportsInstanceBreakpoints()
Returns whether this target supports instance breakpoints.
|
boolean |
supportsInstanceRetrieval()
Returns whether this VM supports instance and reference retrieval for
types and objects.
|
boolean |
supportsModificationWatchpoints()
Returns whether this target supports modification watchpoints.
|
boolean |
supportsMonitorInformation()
Returns whether this target supports providing monitor information.
|
boolean |
supportsRequestTimeout()
Returns whether this debug target supports a request timeout - a maximum
time for a JDI request to receive a response.
|
boolean |
supportsSelectiveGarbageCollection()
Returns whether this VM supports the ability to enable and disable
garbage collection of individual objects.
|
IJavaValue |
voidValue()
Returns a value from this target that corresponds to
void . |
getName, getProcess, getThreads, hasThreads, supportsBreakpoint
getDebugTarget, getLaunch, getModelIdentifier
getAdapter
canTerminate, isTerminated, terminate
canResume, canSuspend, isSuspended, resume, suspend
breakpointAdded, breakpointChanged, breakpointRemoved
canDisconnect, disconnect, isDisconnected
getMemoryBlock, supportsStorageRetrieval
isStepFiltersEnabled, setStepFiltersEnabled, supportsStepFilters
IJavaVariable findVariable(String variableName) throws DebugException
null
if unable to resolve a variable with the name.
Variable lookup works only when a debug target has one or more threads
suspended. Lookup is performed in each suspended thread, returning the
first successful match, or null
if no match if found. If
this debug target has no suspended threads, null
is
returned.
variableName
- name of the variablenull
if noneDebugException
- if this method fails. Reasons include:
IJavaType[] getJavaTypes(String name) throws DebugException
null
of no type with the given name is
loaded.name
- fully qualified name of type, for example
java.lang.String
null
DebugException
- if this method fails. Reasons include:
IJavaValue newValue(boolean value)
value
- a boolean from which to create a valueIJavaValue newValue(byte value)
value
- a byte from which to create a valueIJavaValue newValue(char value)
value
- a char from which to create a valueIJavaValue newValue(double value)
value
- a double from which to create a valueIJavaValue newValue(float value)
value
- a float from which to create a valueIJavaValue newValue(int value)
value
- an int from which to create a valueIJavaValue newValue(long value)
value
- a long from which to create a valueIJavaValue newValue(short value)
value
- a short from which to create a valueIJavaValue newValue(String value)
value
- a string from which to create a valueIJavaValue nullValue()
null
.
The returned value can be used for setting and comparing against a value
retrieved from this debug target.null
IJavaValue voidValue()
void
.
The returned value can be used for setting and comparing against a value
retrieved from this debug target.void
boolean isOutOfSynch() throws DebugException
DebugException
- if this method fails. Reasons include:
boolean mayBeOutOfSynch() throws DebugException
DebugException
- if this method fails. Reasons include:
boolean supportsHotCodeReplace()
boolean isPerformingHotCodeReplace()
boolean supportsInstanceBreakpoints()
boolean isFilterSynthetics()
void setFilterSynthetics(boolean filter)
filter
- whether to synthetic methods are filtered when steppingboolean isFilterGetters()
void setFilterGetters(boolean filter)
filter
- whether to filter simple getters when steppingboolean isFilterSetters()
void setFilterSetters(boolean filter)
filter
- whether to filter simple setters when steppingboolean isFilterStaticInitializers()
void setFilterStaticInitializers(boolean filter)
filter
- whether to filter static initializers when steppingboolean isFilterConstructors()
void setFilterConstructors(boolean filter)
filter
- whether to filter constructors when steppingString[] getStepFilters()
java.lang.*
or java.lang.String
.null
void setStepFilters(String[] list)
java.lang.*
or java.lang.String
.list
- active step filters, or null
void setStepThruFilters(boolean thru)
thru
- whether to step thru a filtered location or return to location
where step originatedboolean isStepThruFilters()
boolean supportsRequestTimeout()
void setRequestTimeout(int timeout)
timeout
- the communication timeout, in millisecondsint getRequestTimeout()
boolean supportsMonitorInformation()
boolean supportsAccessWatchpoints()
boolean supportsModificationWatchpoints()
void setDefaultStratum(String stratum)
stratum
- the new default stratum, or null
to indicate
per-class default stratumString getDefaultStratum()
null
to indicate a per-class default stratum.null
to indicate a per-class
default stratumsetDefaultStratum(String)
IJavaThreadGroup[] getRootThreadGroups() throws DebugException
DebugException
- if an exception occursIJavaThreadGroup[] getAllThreadGroups() throws DebugException
DebugException
- if an exception occursboolean supportsInstanceRetrieval()
boolean supportsForceReturn()
IJavaThread
boolean supportsSelectiveGarbageCollection()
IJavaObject
String getVMName() throws DebugException
java.vm.name
.DebugException
- if retrieving the name failsString getVersion() throws DebugException
java.version
.java.version
system propertyDebugException
- if retrieving the version property failsvoid refreshState() throws DebugException
For example, a IJavaThread
may currently have a suspended state,
but was somehow resumed on the target. Calling this method will causes
all threads to update their state based on the current state of the
target. Elements will fire debug events associated with any state
changes. For example, a thread would fire a resume event if it discovered
it was in a running state when it thought it was suspended.
DebugException
- if an exception occursbyte[] sendCommand(byte commandSet, byte commandId, byte[] data) throws DebugException
commandSet
- command set identifier as defined by JDWPcommandId
- command identifier as defined by JDWPdata
- any bytes required for the command that follow the command
header or null
for commands that have no dataDebugException
- if an error occurs sending the packet or receiving the
replyvoid addHotCodeReplaceListener(IJavaHotCodeReplaceListener listener)
When a hot code replace listener is added to a specific target, general
hot code replace notifications via JDIDebugModel
are not reported
for that target. This allows a target to override general/default hot
code replace listeners/handlers.
listener
- hot code replace listenervoid removeHotCodeReplaceListener(IJavaHotCodeReplaceListener listener)
listener
- hot code replace listener
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.