public class DVariable extends Object implements Variable, Comparable
| Modifier and Type | Field and Description |
|---|---|
static int |
kBooleanObjectType |
static int |
kButtonObjectType |
static int |
kDateObjectType |
static int |
kFapPacketDummyObject |
static int |
kLoadVarsObject |
static int |
kMovieClipLoaderObjectType |
static int |
kNativeArrayObject |
static int |
kNativeCameraObject |
static int |
kNativeCommunicationObject |
static int |
kNativeMicrophoneObject |
static int |
kNativeStringObject |
static int |
kNativeXMLDoc |
static int |
kNativeXMLNode |
static int |
kNetConnectionObjectType |
static int |
kNetStreamObjectType |
static int |
kNormalObjectType
These values are obtained directly from the Player.
|
static int |
kNumberObjectType |
static int |
kPrintJobObjectType |
static int |
kSharedObjectDataType |
static int |
kSharedObjectType |
static int |
kSoundObjectType |
static int |
kStyleSheetObjectType |
static int |
kTextFieldObjectType |
static int |
kTextFormatObjectType |
static int |
kTextSnapshotType |
static int |
kVideoObjectType |
static int |
kXMLSocketObjectType |
protected Value |
m_value
The variable's value.
|
| Constructor and Description |
|---|
DVariable(String name,
DValue value,
int isolateId)
Create a variable and its value.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
classNameFor(long clsType,
boolean isMc) |
void |
clearAttribute(int att) |
int |
compareTo(Object o2)
Comparator interface for sorting Variables
|
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.
|
String |
getRawName() |
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 att) |
void |
makePublic() |
boolean |
needsToInvokeGetter() |
void |
setAttribute(int att) |
void |
setAttributes(int f) |
void |
setDefiningClass(int level,
String definingClass) |
void |
setName(String s) |
void |
setSession(Session s) |
FaultEvent |
setValue(Session s,
int type,
String value)
Changes the value of a variable.
|
String |
toString()
Added so that expressions such as
a.b.c = e.f work in the command-line interface. |
static String |
typeNameFor(int type)
Return the internal player string type representation for this variable.
|
protected Value m_value
public static final int kNormalObjectType
public static final int kXMLSocketObjectType
public static final int kTextFieldObjectType
public static final int kButtonObjectType
public static final int kNumberObjectType
public static final int kBooleanObjectType
public static final int kNativeStringObject
public static final int kNativeArrayObject
public static final int kDateObjectType
public static final int kSoundObjectType
public static final int kNativeXMLDoc
public static final int kNativeXMLNode
public static final int kNativeCameraObject
public static final int kNativeMicrophoneObject
public static final int kNativeCommunicationObject
public static final int kNetConnectionObjectType
public static final int kNetStreamObjectType
public static final int kVideoObjectType
public static final int kTextFormatObjectType
public static final int kSharedObjectType
public static final int kSharedObjectDataType
public static final int kPrintJobObjectType
public static final int kMovieClipLoaderObjectType
public static final int kStyleSheetObjectType
public static final int kFapPacketDummyObject
public static final int kLoadVarsObject
public static final int kTextSnapshotType
public String getName()
Variablepublic int getAttributes()
VariablegetAttributes in interface VariableVariableAttributepublic String getNamespace()
VariablegetNamespace in interface Variablenullpublic int getScope()
VariablegetScope in interface VariableVariableAttributepublic 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 getIsolateId()
VariablegetIsolateId in interface Variablepublic void makePublic()
public 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 boolean isAttributeSet(int att)
isAttributeSet in interface VariableVariableAttributepublic void clearAttribute(int att)
public void setAttribute(int att)
public String getRawName()
public String getQualifiedName()
VariablegetQualifiedName in interface Variablepublic int compareTo(Object o2)
compareTo in interface Comparablepublic 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 void setName(String s)
public void setAttributes(int f)
public void setSession(Session s)
public void setDefiningClass(int level,
String definingClass)
public String toString()
a.b.c = e.f work in the command-line interface.toString in class ObjectContext.lookup(Object)public static String typeNameFor(int type)
public static String classNameFor(long clsType, boolean isMc)
Copyright © 2016 The Apache Software Foundation. All rights reserved.