Eclipse JDT
2.1

org.eclipse.jdt.debug.core
Interface IJavaDebugTarget

All Superinterfaces:
IAdaptable, IBreakpointListener, IDebugElement, IDebugTarget, IDisconnect, IMemoryBlockRetrieval, ISuspendResume, ITerminate

public interface IJavaDebugTarget
extends IDebugTarget

A Java virtual machine.

Clients are not intended to implement this interface.

See Also:
IDebugTarget, IAdaptable

Method Summary
 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.
 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.
 String[] getStepFilters()
          Returns the list of active step filters in this target.
 boolean isFilterConstructors()
          Returns whether constructors are filtered when stepping, if step filters are enabled.
 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 isStepFiltersEnabled()
          Returns whether step filters are enabled in this target.
 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 setFilterConstructors(boolean filter)
          Sets whether to filter constructors 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 setStepFiltersEnabled(boolean enabled)
          Sets whether step filters are enabled in this target.
 boolean supportsHotCodeReplace()
          Returns whether this target supports hot code replace.
 boolean supportsInstanceBreakpoints()
          Returns whether this target supports instance breakpoints.
 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.
 IJavaValue voidValue()
          Returns a value from this target that corresponds to void.
 
Methods inherited from interface org.eclipse.debug.core.model.IDebugTarget
getName, getProcess, getThreads, hasThreads, supportsBreakpoint
 
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget, getLaunch, getModelIdentifier
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.debug.core.model.ITerminate
canTerminate, isTerminated, terminate
 
Methods inherited from interface org.eclipse.debug.core.model.ISuspendResume
canResume, canSuspend, isSuspended, resume, suspend
 
Methods inherited from interface org.eclipse.debug.core.IBreakpointListener
breakpointAdded, breakpointChanged, breakpointRemoved
 
Methods inherited from interface org.eclipse.debug.core.model.IDisconnect
canDisconnect, disconnect, isDisconnected
 
Methods inherited from interface org.eclipse.debug.core.model.IMemoryBlockRetrieval
getMemoryBlock, supportsStorageRetrieval
 

Method Detail

findVariable

public IJavaVariable findVariable(String variableName)
                           throws DebugException
Searches for and returns a variable with the given name, or 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.

Parameters:
variableName - name of the variable
Returns:
a variable with the given name, or null if none
Throws:
DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.

getJavaTypes

public IJavaType[] getJavaTypes(String name)
                         throws DebugException
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.
Parameters:
name - fully qualified name of type, for example java.lang.String
Returns:
the types with the given name, or null
Throws:
DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.

newValue

public IJavaValue newValue(boolean value)
Returns a value from this target that corresponds to the given boolean. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Parameters:
value - a boolean from which to create a value
Returns:
a corresponding value from this target

newValue

public IJavaValue newValue(byte value)
Returns a value from this target that corresponds to the given byte. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Parameters:
value - a byte from which to create a value
Returns:
a corresponding value from this target

newValue

public IJavaValue newValue(char value)
Returns a value from this target that corresponds to the given char. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Parameters:
value - a char from which to create a value
Returns:
a corresponding value from this target

newValue

public IJavaValue newValue(double value)
Returns a value from this target that corresponds to the given double. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Parameters:
value - a double from which to create a value
Returns:
a corresponding value from this target

newValue

public IJavaValue newValue(float value)
Returns a value from this target that corresponds to the given float. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Parameters:
value - a float from which to create a value
Returns:
a corresponding value from this target

newValue

public IJavaValue newValue(int value)
Returns a value from this target that corresponds to the given int. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Parameters:
value - an int from which to create a value
Returns:
a corresponding value from this target

newValue

public IJavaValue newValue(long value)
Returns a value from this target that corresponds to the given long. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Parameters:
value - a long from which to create a value
Returns:
a corresponding value from this target

newValue

public IJavaValue newValue(short value)
Returns a value from this target that corresponds to the given short. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Parameters:
value - a short from which to create a value
Returns:
a corresponding value from this target

newValue

public IJavaValue newValue(String value)
Returns a value from this target that corresponds to the given string. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Parameters:
value - a string from which to create a value
Returns:
a corresponding value from this target

nullValue

public IJavaValue nullValue()
Returns a value from this target that corresponds to null. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Returns:
a value corresponding to null

voidValue

public IJavaValue voidValue()
Returns a value from this target that corresponds to void. The returned value can be used for setting and comparing against a value retrieved from this debug target.
Returns:
a value corresponding to void

isOutOfSynch

public boolean isOutOfSynch()
                     throws DebugException
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.
Returns:
whether this debug target is out of synch with the workspace.
Throws:
DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.

mayBeOutOfSynch

public boolean mayBeOutOfSynch()
                        throws DebugException
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.
Returns:
whether this debug target may be out of synch with the workspace.
Throws:
DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.

supportsHotCodeReplace

public boolean supportsHotCodeReplace()
Returns whether this target supports hot code replace.
Returns:
whether this target supports hot code replace

isPerformingHotCodeReplace

public boolean isPerformingHotCodeReplace()
Returns whether this target is currently performing a hot code replace.
Returns:
whether this target is currently performing a hot code replace
Since:
2.1

supportsInstanceBreakpoints

public boolean supportsInstanceBreakpoints()
Returns whether this target supports instance breakpoints.
Returns:
whether this target supports instance breakpoints
Since:
2.1

isStepFiltersEnabled

public boolean isStepFiltersEnabled()
Returns whether step filters are enabled in this target.
Returns:
whether step filters are enabled in this target

setStepFiltersEnabled

public void setStepFiltersEnabled(boolean enabled)
Sets whether step filters are enabled in this target.
Parameters:
enabled - whether step filters are enabled in this target

isFilterSynthetics

public boolean isFilterSynthetics()
Returns whether synthetic methods are filtered when stepping, if step filters are enabled.
Returns:
whether synthetic methods are filtered when stepping

setFilterSynthetics

public void setFilterSynthetics(boolean filter)
Sets whether synthetic methods are filtered when stepping.
Parameters:
filter - whether to synthetic methods are filtered when stepping

isFilterStaticInitializers

public boolean isFilterStaticInitializers()
Returns whether static initializers are filtered when stepping, if step filters are enabled.
Returns:
whether static initializers are filtered when stepping

setFilterStaticInitializers

public void setFilterStaticInitializers(boolean filter)
Sets whether to filter static initializers when stepping.
Parameters:
filter - whether to filter static initializers when stepping

isFilterConstructors

public boolean isFilterConstructors()
Returns whether constructors are filtered when stepping, if step filters are enabled.
Returns:
whether constructors are filtered when stepping

setFilterConstructors

public void setFilterConstructors(boolean filter)
Sets whether to filter constructors when stepping.
Parameters:
filter - whether to filter constructors when stepping

getStepFilters

public String[] getStepFilters()
Returns the list of active step filters in this target. The list is a collection of Strings. Each string is the fully qualified name/pattern of a type/package to filter when stepping. For example java.lang.* or java.lang.String.
Returns:
the list of active step filters, or null

setStepFilters

public void setStepFilters(String[] list)
Sets the list of active step filters in this target. The list is a collection of Strings. Each string is the fully qualified name/pattern of a type/package to filter when stepping. For example java.lang.* or java.lang.String.
Parameters:
list - active step filters, or null

supportsRequestTimeout

public boolean supportsRequestTimeout()
Returns whether this debug target supports a request timeout - a maximum time for a JDI request to receive a response. This option is only supported by the Eclipse JDI implementation.
Returns:
whether this debug target supports a request timeout

setRequestTimeout

public void setRequestTimeout(int timeout)
Sets the timeout value for JDI requests in milliseconds. Has no effect if this target does not support a request timeout.
Parameters:
timeout - the communication timeout, in milliseconds

getRequestTimeout

public int getRequestTimeout()
Returns the timeout value for JDI requests in milliseconds, or -1 if not supported.
Returns:
timeout value, in milliseconds, or -1 if not supported

supportsMonitorInformation

public boolean supportsMonitorInformation()
Returns whether this target supports providing monitor information.
Returns:
whether this target supports providing monitor information.
Since:
2.1

Eclipse JDT
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.