Package org.eclipse.debug.core.model
Interface IValue
- All Superinterfaces:
IAdaptable
,IDebugElement
- All Known Subinterfaces:
IIndexedValue
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:
-
Method Summary
Modifier and TypeMethodDescriptionReturns a description of the type of data this value contains or references.Returns this value as aString
.Returns the visible variables in this value.boolean
Returns whether this value currently contains any visible variables.boolean
Returns whether this value is currently allocated.Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget, getLaunch, getModelIdentifier
-
Method Details
-
getReferenceTypeName
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
Returns this value as aString
.- 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
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
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
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
-