BASE_ID, GLOBAL_ID, LEVEL_ID, ROOT_ID, THIS_ID, TRAITS_TYPE_NAME, UNDEFINED, UNKNOWN_ID
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
getAttributes()
Variable attributes define further information
regarding the variable.
|
String[] |
getClassHierarchy(boolean allLevels)
Returns the list of classes that contributed members to this object, from
the class itself all the way down to
Object (or, if
allLevels == false, down to the lowest-level class that actually
contributed members). |
String |
getClassName()
The class name of the value.
|
long |
getId()
Returns a unique ID for the object referred to by this variable.
|
int |
getIsolateId()
Get the worker id of the isolate to which this value belongs.
|
int |
getMemberCount(Session s)
Returns the number of child members of this variable.
|
Variable |
getMemberNamed(Session s,
String name)
Returns a specific child member of this variable.
|
Variable[] |
getMembers(Session s)
Returns all child members of this variable.
|
Variable[] |
getPrivateInheritedMemberNamed(String name)
Get all the private variables with the given name.
|
Variable[] |
getPrivateInheritedMembers()
Returns all child members of this variable that are private and are present
in its inheritance chain.
|
static Value |
getRaw(Value v)
Returns the raw Value underlying a ThreadSafeValue.
|
Object |
getSyncObject() |
static Object |
getSyncObject(Value v) |
int |
getType()
Variable type can be one of VariableType.OBJECT,
VariableType.FUNCTION, VariableType.NUMBER, VariableType.STRING,
VariableType.UNDEFINED, VariableType.NULL.
|
String |
getTypeName()
The type name of the value:
"Number"
"Boolean"
"String"
"null"
"undefined"
Value.TRAITS_TYPE_NAME if this value represents the
traits of a class
"[package::]Classname@hexaddr" if this value
represents an instance of a non-primitive object. |
Object |
getValueAsObject()
Returns the value of the variable, as an Object.
|
String |
getValueAsString()
Returns the value of the variable, converted to a string.
|
boolean |
isAttributeSet(int variableAttribute) |
String |
toString() |
static ThreadSafeValue |
wrap(Object syncObj,
Value val)
Wraps a Value inside a ThreadSafeValue.
|
static ThreadSafeValue[] |
wrapArray(Object syncObj,
Value[] values)
Wraps an array of Values inside an array of ThreadSafeValues.
|
public static ThreadSafeValue wrap(Object syncObj, Value val)
public static ThreadSafeValue[] wrapArray(Object syncObj, Value[] values)
public int getAttributes()
Value
getAttributes
in interface Value
VariableAttribute
public String getClassName()
Value
DVariable.classNameFor(long, boolean)
.
In the AS3 world, the only possible return values from this function are:
"Object"
for instances of non-primitive classes such
as Object, Array, etc. ""
all primitive values (Number, Boolean, String,
null, undefined), or the traits of a class. getClassName
in interface Value
public long getId()
Value
UNKNOWN_ID
.public int getMemberCount(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException
Value
getMemberCount
in interface Value
NotSuspendedException
NoResponseException
NotConnectedException
public Variable getMemberNamed(Session s, String name) throws NotSuspendedException, NoResponseException, NotConnectedException
Value
Object or MovieClip.
getMemberNamed
in interface Value
s
- the sessionname
- just a varname name, without its namespace (see getName()
)NotSuspendedException
NoResponseException
NotConnectedException
public Variable[] getMembers(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException
Value
getMembers
in interface Value
NotSuspendedException
NoResponseException
NotConnectedException
public int getType()
Value
public String getTypeName()
Value
"Number"
"Boolean"
"String"
"null"
"undefined"
Value.TRAITS_TYPE_NAME
if this value represents the
traits of a class "[package::]Classname@hexaddr"
if this value
represents an instance of a non-primitive object. For example, if this is
an instance of mx.core.Application, the type name might be
"mx.core::Application@1234abcd". getTypeName
in interface Value
public Object getValueAsObject()
Value
null
Value.UNDEFINED
Boolean
Double
(careful, it might be Double.NaN
) String
Long
if this value represents a non-primitive
type, such as an Object. If it is a Long, then it is the id of
the Value (the same value returned by getId()
).
getValueAsObject
in interface Value
public String getValueAsString()
Value
getValueAsString
in interface Value
public boolean isAttributeSet(int variableAttribute)
isAttributeSet
in interface Value
VariableAttribute
public String[] getClassHierarchy(boolean allLevels)
Value
Object
(or, if
allLevels == false, down to the lowest-level class that actually
contributed members).getClassHierarchy
in interface Value
allLevels
- if true
, the caller wants the entire class
hierarchy. If false
, the caller wants only
that portion of the class hierarchy that actually contributed
member variables to the object. For example,
Object
has no members, so if the caller passes
true
then the returned array of strings will
always end with Object
, but if the caller
passes false
then the returned array of strings
will never end with Object
.public Variable[] getPrivateInheritedMembers()
Value
getPrivateInheritedMembers
in interface Value
public Variable[] getPrivateInheritedMemberNamed(String name)
Value
getPrivateInheritedMemberNamed
in interface Value
name
- Variable name.public int getIsolateId()
Value
getIsolateId
in interface Value
public final Object getSyncObject()
Copyright © 2016 The Apache Software Foundation. All rights reserved.