public interface Value
Modifier and Type | Field and Description |
---|---|
static long |
BASE_ID
The special ID for the top frame of the stack.
|
static long |
GLOBAL_ID
The special ID for pseudo-variable "_global".
|
static long |
LEVEL_ID
_level0 == LEVEL_ID, _level1 == LEVEL_ID-1, ...
|
static long |
ROOT_ID
The special ID for pseudo-variable "_root".
|
static long |
THIS_ID
The special ID for pseudo-variable "this".
|
static String |
TRAITS_TYPE_NAME
The return value of getTypeName() if this value represents the traits of a class.
|
static Object |
UNDEFINED
A special object representing ActionScript's "undefined" value.
|
static long |
UNKNOWN_ID
The value returned if somone calls getId() for a Variable
which stores a variable of simple type such as String or
integer, rather than an Object or MovieClip.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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) |
static final Object UNDEFINED
static final long UNKNOWN_ID
getId()
,
Constant Field Valuesstatic final long GLOBAL_ID
getId()
,
Constant Field Valuesstatic final long THIS_ID
getId()
,
Constant Field Valuesstatic final long ROOT_ID
getId()
,
Constant Field Valuesstatic final long BASE_ID
BASE_ID
; the next
stack frame has ID BASE_ID - 1
; and so on.getId()
,
Constant Field Valuesstatic final long LEVEL_ID
static final String TRAITS_TYPE_NAME
int getType()
String getTypeName()
"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". String getClassName()
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. int getAttributes()
VariableAttribute
boolean isAttributeSet(int variableAttribute)
VariableAttribute
long getId()
UNKNOWN_ID
.Object getValueAsObject()
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()
).
String getValueAsString()
Variable[] getMembers(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException
Variable getMemberNamed(Session s, String name) throws NotSuspendedException, NoResponseException, NotConnectedException
Object or MovieClip.
s
- the sessionname
- just a varname name, without its namespace (see getName()
)NotConnectedException
NoResponseException
NotSuspendedException
int getMemberCount(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException
String[] getClassHierarchy(boolean allLevels)
Object
(or, if
allLevels == false, down to the lowest-level class that actually
contributed members).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
.Variable[] getPrivateInheritedMembers()
Variable[] getPrivateInheritedMemberNamed(String name)
name
- Variable name.int getIsolateId()
Copyright © 2016 The Apache Software Foundation. All rights reserved.