public class VariableFacade extends Object implements Variable
| Constructor and Description |
|---|
VariableFacade(long context,
String name,
int m_isolateId) |
VariableFacade(Variable v,
long context,
int m_isolateId) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAttributes()
Variable attributes define further information
regarding the variable.
|
long |
getContext()
Our lone get context (i.e. parent) interface
|
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 variable interface
|
String |
getNamespace()
The namespace of the variable.
|
String |
getPath() |
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.
|
Variable |
getVariable() |
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() |
void |
setPath(String path) |
FaultEvent |
setValue(Session s,
int type,
String value)
Changes the value of a variable.
|
String |
toString() |
public VariableFacade(Variable v, long context, int m_isolateId)
public VariableFacade(long context,
String name,
int m_isolateId)
public String getQualifiedName()
VariablegetQualifiedName in interface Variablepublic String getNamespace()
VariablegetNamespace in interface Variablenullpublic 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 String getDefiningClass()
VariablegetDefiningClass in interface Variablepublic int getAttributes()
VariablegetAttributes in interface VariableVariableAttributepublic int getScope()
VariablegetScope in interface VariableVariableAttributepublic boolean isAttributeSet(int variableAttribute)
isAttributeSet in interface VariableVariableAttributepublic Value getValue()
Variablepublic boolean hasValueChanged(Session s)
Variablefalse.hasValueChanged in interface Variablepublic 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 getPath()
public void setPath(String path)
public 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 long getContext()
public Variable getVariable()
public int getIsolateId()
VariablegetIsolateId in interface VariableCopyright © 2016 The Apache Software Foundation. All rights reserved.