public class SpringPropertyProxy
extends flex.messaging.io.BeanProxy
ConversionService-aware PropertyProxy that seeks to find an appropriate converter for
a given bean property during AMF serialization and deserialization.
Uses Spring's PropertyAccessor interface for all property access, allowing for optional direct field access
on the objects being serialized/deserialized.
| Modifier and Type | Class and Description |
|---|---|
static class |
SpringPropertyProxy.DelayedWriteSpringPropertyProxy
Extension to
SpringPropertyProxy that allow for use of classes that lack default no-arg constructors and instead have
a constructor annotated with AmfCreator. |
| Modifier and Type | Field and Description |
|---|---|
protected Class<?> |
beanType |
protected ConversionService |
conversionService |
protected boolean |
useDirectFieldAccess |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getBeanType()
The type for which this
PropertyProxy is registered. |
Object |
getInstanceToSerialize(Object instance)
Delegates to the configured
ConversionService to potentially convert the instance to the registered bean type. |
List<String> |
getPropertyNames(Object instance) |
Class<?> |
getType(Object instance,
String propertyName) |
Object |
getValue(Object instance,
String propertyName)
Delegates to the configured
ConversionService to potentially convert the current value to the actual type of the property. |
boolean |
isWriteOnly(Object instance,
String propertyName) |
static SpringPropertyProxy |
proxyFor(Class<?> beanType,
boolean useDirectFieldAccess,
ConversionService conversionService)
Factory method for creating correctly configured Spring property proxy instances.
|
void |
setValue(Object instance,
String propertyName,
Object value)
Delegates to the configured
ConversionService to potentially convert the value to the actual type of the property. |
addIgnoreProperty, clear, clone, getAlias, getBeanProperties, getBeanProperty, getBeanValue, getClassName, ignorePropertyErrors, isPropertyIgnored, isPublicAccessor, isPublicField, logPropertyErrorscreateInstance, createInstanceFromClassName, getAlias, getClassFromClassName, getDefaultInstance, getDescriptor, getIncludeReadOnly, getPropertyNames, getSerializationContext, getType, getValue, instanceComplete, isDynamic, isExternalizable, isExternalizable, setAlias, setCloneFieldsFrom, setDefaultInstance, setDescriptor, setDynamic, setExternalizable, setIncludeReadOnly, setSerializationContext, setValue, toStringprotected final ConversionService conversionService
protected final Class<?> beanType
protected final boolean useDirectFieldAccess
public static SpringPropertyProxy proxyFor(Class<?> beanType, boolean useDirectFieldAccess, ConversionService conversionService)
beanType - the type being introspecteduseDirectFieldAccess - whether to access fields directlyconversionService - the conversion service to use for property type conversionpublic Class<?> getBeanType()
PropertyProxy is registered.public Object getInstanceToSerialize(Object instance)
ConversionService to potentially convert the instance to the registered bean type.getInstanceToSerialize in interface flex.messaging.io.PropertyProxygetInstanceToSerialize in class flex.messaging.io.AbstractProxypublic List<String> getPropertyNames(Object instance)
getPropertyNames in interface flex.messaging.io.PropertyProxygetPropertyNames in class flex.messaging.io.BeanProxypublic Class<?> getType(Object instance, String propertyName)
getType in interface flex.messaging.io.PropertyProxygetType in class flex.messaging.io.BeanProxypublic Object getValue(Object instance, String propertyName)
ConversionService to potentially convert the current value to the actual type of the property.getValue in interface flex.messaging.io.PropertyProxygetValue in class flex.messaging.io.BeanProxypublic boolean isWriteOnly(Object instance, String propertyName)
isWriteOnly in class flex.messaging.io.BeanProxypublic void setValue(Object instance, String propertyName, Object value)
ConversionService to potentially convert the value to the actual type of the property.setValue in interface flex.messaging.io.PropertyProxysetValue in class flex.messaging.io.BeanProxyCopyright © 2014. All rights reserved.