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()
Variable
public int getAttributes()
Variable
getAttributes
in interface Variable
VariableAttribute
public boolean isAttributeSet(int variableAttribute)
isAttributeSet
in interface Variable
VariableAttribute
public Value getValue()
Variable
public boolean hasValueChanged(Session s)
Variable
false
.hasValueChanged
in interface Variable
public boolean needsToInvokeGetter()
needsToInvokeGetter
in interface Variable
public void invokeGetter(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException
Variable
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.
invokeGetter
in interface Variable
NotSuspendedException
NoResponseException
NotConnectedException
public String getQualifiedName()
Variable
getQualifiedName
in interface Variable
public String getNamespace()
Variable
getNamespace
in interface Variable
null
public int getScope()
Variable
getScope
in interface Variable
VariableAttribute
public FaultEvent setValue(Session s, int type, String value) throws NotSuspendedException, NoResponseException, NotConnectedException
Variable
setValue
in interface Variable
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.NotSuspendedException
- if Player is runningNoResponseException
- if times outNotConnectedException
- if Player is disconnected from Sessionpublic String getDefiningClass()
Variable
getDefiningClass
in interface Variable
public int getLevel()
Variable
class A { int a } class B extends A { int b } class C extends B { int c } var myObject: CIn 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()
Variable
getIsolateId
in interface Variable
public final Object getSyncObject()
Copyright © 2016 The Apache Software Foundation. All rights reserved.