| 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.
|
static Variable |
getRaw(Variable v)
Returns the raw Variable underlying a ThreadSafeVariable.
|
int |
getScope()
Returns just the scope bits of the attributes.
|
Object |
getSyncObject() |
static Object |
getSyncObject(Variable v) |
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 |
toString() |
static ThreadSafeVariable |
wrap(Object syncObj,
Variable variable)
Wraps a Variable inside a ThreadSafeVariable.
|
static ThreadSafeVariable[] |
wrapArray(Object syncObj,
Variable[] variables)
Wraps an array of Variables inside an array of ThreadSafeVariables.
|
public static ThreadSafeVariable wrap(Object syncObj, Variable variable)
public static ThreadSafeVariable[] wrapArray(Object syncObj, Variable[] variables)
public static Variable getRaw(Variable v)
public String getName()
Variablepublic int getAttributes()
VariablegetAttributes in interface VariableVariableAttributepublic boolean isAttributeSet(int variableAttribute)
isAttributeSet in interface VariableVariableAttributepublic Value getValue()
Variablepublic boolean hasValueChanged(Session s)
Variablefalse.hasValueChanged in interface Variablepublic boolean needsToInvokeGetter()
needsToInvokeGetter in interface Variablepublic void invokeGetter(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException
VariableHAS_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.
invokeGetter in interface VariableNotSuspendedExceptionNoResponseExceptionNotConnectedExceptionpublic String getQualifiedName()
VariablegetQualifiedName in interface Variablepublic String getNamespace()
VariablegetNamespace in interface Variablenullpublic int getScope()
VariablegetScope in interface VariableVariableAttributepublic FaultEvent setValue(Session s, int type, String value) throws NotSuspendedException, NoResponseException, NotConnectedException
VariablesetValue in interface Variabletype - 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.NotSuspendedException - if Player is runningNoResponseException - if times outNotConnectedException - if Player is disconnected from Sessionpublic String getDefiningClass()
VariablegetDefiningClass in interface Variablepublic int getLevel()
Variable
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.public int getIsolateId()
VariablegetIsolateId in interface Variablepublic final Object getSyncObject()
Copyright © 2016 The Apache Software Foundation. All rights reserved.