flex.messaging.io
Class MapProxy

java.lang.Object
  extended by flex.messaging.io.AbstractProxy
      extended by flex.messaging.io.BeanProxy
          extended by flex.messaging.io.MapProxy
All Implemented Interfaces:
PropertyProxy, Serializable, Cloneable
Direct Known Subclasses:
SerializationProxy

public class MapProxy
extends BeanProxy

Proxies serialization of a Map and considers all keys as String based property names. Additionally, bean properties from the instance are also included and override any Map entries with the same key name.

See Also:
Serialized Form

Constructor Summary
MapProxy()
          Constructor
MapProxy(Object defaultInstance)
          Construct with a default instance type.
 
Method Summary
 Object clone()
          Returns a copy of the PropertyProxy so that it can be used as a template without modifying/creating global references to instances, descriptors etc.
 List getPropertyNames(Object instance)
          The List of property names as Strings that make up the traits of the given instance. These traits determine which properties are to be serialized.
 Object getValue(Object instance, String propertyName)
          Looks up the value of a property by name for the given instance.
 void setValue(Object instance, String propertyName, Object value)
          Updates the value of a property by name for the given instance.
 
Methods inherited from class flex.messaging.io.BeanProxy
addIgnoreProperty, clear, getAlias, getType, isPropertyIgnored, isPublicAccessor, isPublicField
 
Methods inherited from class flex.messaging.io.AbstractProxy
createInstance, createInstanceFromClassName, getAlias, getClassFromClassName, getClassFromClassName, getDefaultInstance, getDescriptor, getIncludeReadOnly, getInstanceToSerialize, getPropertyNames, getSerializationContext, getType, getValue, instanceComplete, isDynamic, isExternalizable, isExternalizable, setAlias, setDefaultInstance, setDescriptor, setDynamic, setExternalizable, setIncludeReadOnly, setSerializationContext, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapProxy

public MapProxy()
Constructor


MapProxy

public MapProxy(Object defaultInstance)
Construct with a default instance type.

Parameters:
defaultInstance - defines the alias if provided
Method Detail

getPropertyNames

public List getPropertyNames(Object instance)
The List of property names as Strings that make up the traits of the given instance. These traits determine which properties are to be serialized.

Specified by:
getPropertyNames in interface PropertyProxy
Overrides:
getPropertyNames in class BeanProxy
Parameters:
instance - the object to examine
Returns:
List of property names as Strings to be serialized.

getValue

public Object getValue(Object instance,
                       String propertyName)
Looks up the value of a property by name for the given instance.

Specified by:
getValue in interface PropertyProxy
Overrides:
getValue in class BeanProxy
Parameters:
instance - The instance that possesses the requested property.
propertyName - The name of the property.
Returns:
The value of the given property.

setValue

public void setValue(Object instance,
                     String propertyName,
                     Object value)
Updates the value of a property by name for the given instance.

Specified by:
setValue in interface PropertyProxy
Overrides:
setValue in class BeanProxy
Parameters:
instance - The instance that possesses the requested property.
propertyName - The name of the property to update.
value - The updated value for the property.

clone

public Object clone()
Returns a copy of the PropertyProxy so that it can be used as a template without modifying/creating global references to instances, descriptors etc.

Specified by:
clone in interface PropertyProxy
Overrides:
clone in class BeanProxy
Returns:
A copy of the PropertyProxy.


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

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

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/io/MapProxy.html