er.ajax.json.serializer
Class ERXBeanSerializer
java.lang.Object
org.jabsorb.serializer.AbstractSerializer
er.ajax.json.serializer.ERXBeanSerializer
- All Implemented Interfaces:
- Serializable, org.jabsorb.serializer.Serializer
public class ERXBeanSerializer
- extends org.jabsorb.serializer.AbstractSerializer
ERXBeanSerializer is a rip-off of BeanSerializer except that it supports
WO-style naming (i.e. missing "get").
- See Also:
- Serialized Form
| Fields inherited from class org.jabsorb.serializer.AbstractSerializer |
ser |
| Methods inherited from class org.jabsorb.serializer.AbstractSerializer |
setOwner |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERXBeanSerializer
public ERXBeanSerializer(Class clazz)
analyzeBean
public static ERXBeanSerializer.BeanData analyzeBean(Class<?> clazz)
throws IntrospectionException
- Analyses a bean, returning a BeanData with the data extracted from it.
- Parameters:
clazz - The class of the bean to analyse
- Returns:
- A populated BeanData
- Throws:
IntrospectionException - If a problem occurs during getting the bean
info.
getBeanData
public static ERXBeanSerializer.BeanData getBeanData(Class<?> clazz)
throws IntrospectionException
- Gets the bean data from cache if possible, otherwise analyses the bean.
- Parameters:
clazz - The class of the bean to analyse
- Returns:
- A populated BeanData
- Throws:
IntrospectionException - If a problem occurs during getting the bean
info.
canSerialize
public boolean canSerialize(Class clazz,
Class jsonClazz)
- Specified by:
canSerialize in interface org.jabsorb.serializer.Serializer- Overrides:
canSerialize in class org.jabsorb.serializer.AbstractSerializer
getJSONClasses
public Class<?>[] getJSONClasses()
getSerializableClasses
public Class<?>[] getSerializableClasses()
marshall
public Object marshall(org.jabsorb.serializer.SerializerState state,
Object p,
Object o)
throws org.jabsorb.serializer.MarshallException
- Throws:
org.jabsorb.serializer.MarshallException
tryUnmarshall
public org.jabsorb.serializer.ObjectMatch tryUnmarshall(org.jabsorb.serializer.SerializerState state,
Class clazz,
Object o)
throws org.jabsorb.serializer.UnmarshallException
- Throws:
org.jabsorb.serializer.UnmarshallException
unmarshall
public Object unmarshall(org.jabsorb.serializer.SerializerState state,
Class clazz,
Object o)
throws org.jabsorb.serializer.UnmarshallException
- Throws:
org.jabsorb.serializer.UnmarshallException
Copyright © 2002 – 2011 Project Wonder.