Packageflex.messaging.io.amf
Classpublic class ASObject
InheritanceASObject Inheritance HashMap

This class represents a Flash Actionscript Object (typed or untyped)

Making a class rather than just deserializing to a HashMap was chosen for the following reasons: 1) "types" are not going to be native to Hashmap, table, etc. 2) it helps in making the deserializer/serializer reflexive.



Public Methods
 MethodDefined By
  
Create an Actionscript object.
ASObject
  
ASObject(String name)
Create a named Actionscript object.
ASObject
  
String getType()
get the named type, if any.
ASObject
  
int hashCode()
Return the hashcode of this object.
ASObject
  
void setType(String type)
Sets the named type.
ASObject
  
String toString()

Returns a string representation of this object.

ASObject
Constructor Detail
ASObject()
public ASObject()

Create an Actionscript object.

ASObject() 
public ASObject(String name)

Create a named Actionscript object.

Parameters
name — the type of the object
Method Detail
getType()
public String getType()

get the named type, if any. (otherwise, return null, implying it is unnamed).

Returns
the type.
hashCode() 
public int hashCode()

Return the hashcode of this object. The hashcode is defined to be the sum of the hashcodes of each entry.

Returns
setType() 
public void setType(String type)

Sets the named type. This operation is mostly meaningless on an object that came in off the wire, but will be helpful for objects that will be serialized out to Flash.

Parameters

type — the type of the object.

toString() 
public String toString()

Returns a string representation of this object. The string representation consists of a list of key-value mappings in the order returned by the map's view's iterator, enclosed in braces (). Adjacent mappings are separated by the characters (comma and space). Each key-value mapping is rendered as the key followed by an equals sign () followed by the associated value. Keys and values are converted to strings as by .

This implementation creates an empty string buffer, appends a left brace, and iterates over the map's view, appending the string representation of each in turn. After appending each entry except the last, the string is appended. Finally a right brace is appended. A string is obtained from the stringbuffer, and returned.

If the value is found to be recursive, (three periods) are printed to indicate the loop.

Returns
a String representation of this map.




 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/javadoc/flex/messaging/io/amf/ASObject.html