|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PropertyProxy
A PropertyProxy allows customized serialization and deserialization of complex objects by providing access to each of the steps in the serialization and deserialization process. A serializer asks a PropertyProxy for the class name, traits and properties during serialization. A deserializer asks a PropertyProxy to create a new instance and set property values. Different PropertyProxy implementations may be written for different types of objects such as Map, Dictionary, Enumerable, Throwable, and Beans.
| 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. |
Object |
createInstance(String className)
Creates a new instance for the given className. |
String |
getAlias()
The class name alias for the default instance. |
String |
getAlias(Object instance)
The class name alias for the given instance. |
Object |
getDefaultInstance()
The default instance managed by this PropertyProxy. |
SerializationDescriptor |
getDescriptor()
A serialization descriptor that provides overrides to the default behavior for selecting properties for serialization. |
boolean |
getIncludeReadOnly()
Determines whether read only properties from the instance should be included during default serialization. |
Object |
getInstanceToSerialize(Object instance)
This is called right before we are about to serialize the supplied instance. |
List |
getPropertyNames()
The List of property names as Strings that make up the traits of the default instance. |
List |
getPropertyNames(Object instance)
The List of property names as Strings that make up the traits of the given instance. |
SerializationContext |
getSerializationContext()
The context holds settings that govern serialization behavior. |
Class |
getType(Object instance,
String propertyName)
Looks up the Class type of the property by name on the given instance. |
Class |
getType(String propertyName)
Looks up the Class type of the property by name on the default instance. |
Object |
getValue(Object instance,
String propertyName)
Looks up the value of a property by name for the given instance. |
Object |
getValue(String propertyName)
Looks up the value of the property by name from the default instance. |
Object |
instanceComplete(Object instance)
This is called after the deserialization of the instance is complete (i.e. |
boolean |
isDynamic()
The trait setting "dynamic" is a client-only concept for types that allow for arbitrary public properties to be defined at runtime. |
boolean |
isExternalizable()
Specifies whether the default instance manages its own serialization through the Externalizable interface. |
boolean |
isExternalizable(Object instance)
Specifies whether the given instance manages its own serialization through the Externalizable interface. |
void |
setAlias(String value)
Allows an alias to be set for the instance type. |
void |
setDefaultInstance(Object defaultInstance)
Sets the default instance managed by this PropertyProxy. |
void |
setDescriptor(SerializationDescriptor descriptor)
Allows non-default inclusion/exclusion of properties for serialization. |
void |
setDynamic(boolean value)
Dynamic is a client-only concept for types that allow for arbitrary public properties to be defined at runtime. |
void |
setExternalizable(boolean value)
Specifies whether the given instance manages its own serialization through the Externalizable interface. |
void |
setIncludeReadOnly(boolean value)
If set to true, read only properties will be included during default serialization. |
void |
setSerializationContext(SerializationContext value)
Sets the context for serialization behavior. |
void |
setValue(Object instance,
String propertyName,
Object value)
Updates the value of a property by name for the given instance. |
void |
setValue(String propertyName,
Object value)
Updates the value of a propery by name for the default instance. |
| Method Detail |
|---|
Object getDefaultInstance()
void setDefaultInstance(Object defaultInstance)
defaultInstance - The default instance.Object createInstance(String className)
className - the class to create
List getPropertyNames()
List getPropertyNames(Object instance)
instance - the object to examine
Class getType(String propertyName)
propertyName - The name of the property.
Class getType(Object instance,
String propertyName)
instance - The instance that possesses the property.propertyName - The name of the property.
Object getValue(String propertyName)
propertyName - The name of the property.
Object getValue(Object instance,
String propertyName)
instance - The instance that possesses the requested property.propertyName - The name of the property.
void setValue(String propertyName,
Object value)
propertyName - the property namevalue - the new value
void setValue(Object instance,
String propertyName,
Object value)
instance - The instance that possesses the requested property.propertyName - The name of the property to update.value - The updated value for the property.Object instanceComplete(Object instance)
instance - the instance being deserialized (previously returned from a
createInstance call)
void setAlias(String value)
value - The class name alias.String getAlias()
String getAlias(Object instance)
instance - the object to get the alias of.
void setDynamic(boolean value)
value - Whether the client type is expected to be dynamic. This setting
is currently not used.boolean isDynamic()
boolean isExternalizable()
boolean isExternalizable(Object instance)
instance - the object to check
void setExternalizable(boolean value)
value - if set to true the instance must implement java.io.Externalizable, otherwise
if set to false the proxied type can avoid external serialization
for an otherwise Externalizable type.SerializationContext getSerializationContext()
void setSerializationContext(SerializationContext value)
value - the new contextvoid setIncludeReadOnly(boolean value)
value - whether read only properties should be included.boolean getIncludeReadOnly()
SerializationDescriptor getDescriptor()
void setDescriptor(SerializationDescriptor descriptor)
descriptor - The descriptor to customize property selection for serialization.Object clone()
Object getInstanceToSerialize(Object instance)
instance - the instance encountered during AMF serialization
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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/PropertyProxy.html