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()
Variable
getQualifiedName
in interface Variable
public String getNamespace()
Variable
getNamespace
in interface Variable
null
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 String getDefiningClass()
Variable
getDefiningClass
in interface Variable
public int getAttributes()
Variable
getAttributes
in interface Variable
VariableAttribute
public int getScope()
Variable
getScope
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 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 getPath()
public void setPath(String path)
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 long getContext()
public Variable getVariable()
public int getIsolateId()
Variable
getIsolateId
in interface Variable
Copyright © 2016 The Apache Software Foundation. All rights reserved.