public final class DebugScope extends Object
frame is valid.DebugStackFrame.getScope()| Modifier and Type | Method and Description |
|---|---|
Iterable<DebugValue> |
getArguments()
Get arguments of this scope.
|
DebugValue |
getDeclaredValue(String name)
Get a local variable declared in this scope by name.
|
Iterable<DebugValue> |
getDeclaredValues()
Get local variables declared in this scope, valid at the current suspension point.
|
String |
getName()
Get a human readable name of this scope.
|
DebugScope |
getParent()
Get a parent scope.
|
DebugValue |
getReceiver()
Get value that represents the receiver object of this scope.
|
SourceSection |
getSourceSection()
Get a source section representing this scope.
|
boolean |
isFunctionScope()
Test if this scope represents the function scope at the frame it was
obtained from. |
public String getName()
public DebugScope getParent() throws DebugException
null.DebugException - when guest language code throws an exceptionpublic boolean isFunctionScope()
obtained from. arguments of
function scope represent arguments of the appropriate function.public SourceSection getSourceSection() throws DebugException
null when not available.DebugException - when guest language code throws an exceptionpublic Iterable<DebugValue> getArguments() throws DebugException
function scope,
function arguments are returned.
This method is not thread-safe and will throw an IllegalStateException if called on
another thread than it was created with.
null when this scope does not have a
concept of arguments.DebugException - when guest language code throws an exceptionpublic DebugValue getReceiver()
this in Java or JavaScript and self in Ruby, for
instance.
The returned value has a name that represents the receiver in the guest language. The scope
that represents the function provide receiver object, if there is
one, other scopes do not provide it, unless they override it.
null when there is no receiver
objectpublic Iterable<DebugValue> getDeclaredValues() throws DebugException
parent, to get values of variables declared in parent scope,
if any.
This method is not thread-safe and will throw an IllegalStateException if called on
another thread than it was created with.
DebugException - when guest language code throws an exceptionpublic DebugValue getDeclaredValue(String name) throws DebugException
parent, to get value of a variable declared in parent scope, if any.
This method is not thread-safe and will throw an IllegalStateException if called on
another thread than it was created with.
null when no such value was found.DebugException - when guest language code throws an exception