public abstract class DebugValue extends Object
IllegalStateException
. DebugValue instances neither support equality or preserve identity.
Clients may access the debug value only on the execution thread where the suspended event of the
stack frame was created and notification received; access from other threads will throw
IllegalStateException.
| Modifier and Type | Method and Description |
|---|---|
abstract <T> T |
as(Class<T> clazz)
Converts the debug value into a Java type.
|
List<DebugValue> |
getArray()
Provides array elements when this value represents an array.
|
DebugValue |
getMetaObject()
Get a meta-object of this value, if any.
|
abstract String |
getName()
Returns the name of this value as it is referred to from its origin.
|
Collection<DebugValue> |
getProperties()
Provides properties representing an internal structure of this value.
|
DebugScope |
getScope()
Get the scope where this value is declared in.
|
SourceSection |
getSourceLocation()
Get a source location where this value is declared, if any.
|
boolean |
isArray()
Returns
true if this value represents an array, false otherwise. |
abstract boolean |
isInternal()
Returns
true if this value represents an internal implementation detail,
false otherwise. |
abstract boolean |
isReadable()
Returns
true if this value can be read else false. |
abstract boolean |
isWritable()
Returns
true if this value can be written to, else false. |
abstract void |
set(DebugValue value)
Sets the value using another
DebugValue. |
String |
toString()
Returns a string representation of the debug value.
|
public abstract void set(DebugValue value)
DebugValue. Throws an IllegalStateException if
the value is not writable, the passed value is not readable, this value or the passed value
is invalid, or the guest language of the values do not match. Use
DebugStackFrame.eval(String) to evaluate values to be set.value - the value to setpublic abstract <T> T as(Class<T> clazz)
String.class converts the value to its language specific string representation.
UnsupportedOperationException is thrown. If the value is not readable then an IllegalStateException is thrown.clazz - the type to convert topublic abstract String getName()
null is returned.public abstract boolean isReadable()
true if this value can be read else false.DebugValue.as(Class)public abstract boolean isWritable()
true if this value can be written to, else false.DebugValue.as(Class)public abstract boolean isInternal()
true if this value represents an internal implementation detail,
false otherwise. Internal values should be hidden during normal guest language
debugging.
Language implementations sometimes create internal helper variables that do not correspond to anything explicitly written by a programmer. Language implementors mark these variables as internal.
Clients of the debugging API should assume that displaying internal values is unlikely to help programmers debug guest language programs and might possibly create confusion. However, clients may choose to display all values, for example in a special mode to support development of programming language implementations.
public DebugScope getScope()
null for object properties and other heap
values.null when this value does not belong into any scope.public final Collection<DebugValue> getProperties()
readable then an
IllegalStateException is thrown.public final boolean isArray()
true if this value represents an array, false otherwise.public final List<DebugValue> getArray()
DebugValue.isArray().null when the value does not represent an
array.public final DebugValue getMetaObject()
nullpublic final SourceSection getSourceLocation()
null