Eclipse Platform
2.0

org.eclipse.debug.core.model
Interface IValue

All Superinterfaces:
IAdaptable, IDebugElement

public interface IValue
extends IDebugElement

A value represents the value of a variable. A value representing a complex data structure contains variables.

An implementation may choose to re-use or discard values on iterative thread suspensions. Clients cannot assume that values are identical or equal across iterative thread suspensions and must check for equality on iterative suspensions if they wish to re-use the objects.

An implementation that preserves equality across iterative suspensions may display more desirable behavior in some clients. For example, if variables are preserved while stepping, a UI client would be able to update the UI incrementally, rather than collapse and redraw the entire list or tree.

Clients may implement this interface.

See Also:
IVariable

Method Summary
 String getReferenceTypeName()
          Returns a description of the type of data this value contains or references.
 String getValueString()
          Returns this value as a String.
 IVariable[] getVariables()
          Returns the visible variables in this value.
 boolean hasVariables()
          Returns whether this value currently contains any visible variables.
 boolean isAllocated()
          Returns whether this value is currently allocated.
 
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget, getLaunch, getModelIdentifier
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

getReferenceTypeName

public String getReferenceTypeName()
                            throws DebugException
Returns a description of the type of data this value contains or references.

Returns:
the name of this value's reference type
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.

getValueString

public String getValueString()
                      throws DebugException
Returns this value as a String.

Returns:
a String representation of this value
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.

isAllocated

public boolean isAllocated()
                    throws DebugException
Returns whether this value is currently allocated.

For example, if this value represents an object that has been garbage collected, false is returned.

Returns:
whether this value is currently allocated
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.

getVariables

public IVariable[] getVariables()
                         throws DebugException
Returns the visible variables in this value. An empty collection is returned if there are no visible variables.

Returns:
an array of visible variables
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.
Since:
2.0

hasVariables

public boolean hasVariables()
                     throws DebugException
Returns whether this value currently contains any visible variables.

Returns:
whether this value currently contains any visible variables
Throws:
DebugException - if this method fails. Reasons include:
  • Failure communicating with the debug target. The DebugException's status code contains the underlying exception responsible for the failure.
Since:
2.0

Eclipse Platform
2.0

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