public interface Variable
| Modifier and Type | Method and Description |
|---|---|
int |
getAttributes()
Variable attributes define further information
regarding the variable.
|
String |
getDefiningClass()
The class in which this member was actually defined.
|
int |
getIsolateId()
Get the worker id of the isolate to which this value belongs.
|
int |
getLevel()
For a member variable of an instance of some class, its "level" indicates
how far up the class hierarchy it is from the actual class of the instance.
|
String |
getName()
The name of the variable.
|
String |
getNamespace()
The namespace of the variable.
|
String |
getQualifiedName()
The fully qualified name of the variable, i.e.
|
int |
getScope()
Returns just the scope bits of the attributes.
|
Value |
getValue()
Returns the value of the variable.
|
boolean |
hasValueChanged(Session s)
Returns whether the value of the variable has changed since the last
time the program was suspended.
|
void |
invokeGetter(Session s)
Executes the getter for this variable, and changes its value accordingly.
|
boolean |
isAttributeSet(int variableAttribute) |
boolean |
needsToInvokeGetter() |
FaultEvent |
setValue(Session s,
int type,
String value)
Changes the value of a variable.
|
String getName()
String getQualifiedName()
String getNamespace()
nullint getScope()
VariableAttributeint getLevel()
class A { int a }
class B extends A { int b }
class C extends B { int c }
var myObject: C
In this case, for myObject, the "level" of variable c
is 0; the level of b is 1; and the level of a is 2.String getDefiningClass()
int getAttributes()
VariableAttributeboolean isAttributeSet(int variableAttribute)
VariableAttributeValue getValue()
boolean hasValueChanged(Session s)
false.FaultEvent setValue(Session s, int type, String value) throws NotSuspendedException, NoResponseException, NotConnectedException
type - the type of the member which is being set. Use
VariableType.UNDEFINED in order to set the variable to an
undefined state; the contents of 'value' will be ignored.value - the string value of the member. May be 'true' or 'false' for
Boolean types or any valid number for Number types.NoResponseException - if times outNotSuspendedException - if Player is runningNotConnectedException - if Player is disconnected from Sessionboolean needsToInvokeGetter()
void invokeGetter(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException
HAS_GETTER flag is not affected by this call -- even after this
call, HAS_GETTER will still be true. If you want to test whether the
getter has already been executed, call needsToInvokeGetter().
Has no effect if needsToInvokeGetter() is false.
int getIsolateId()
Copyright © 2016 The Apache Software Foundation. All rights reserved.