ERXBeanSerializer Class Reference

Inherits org::jabsorb::serializer::AbstractSerializer.

Collaboration diagram for ERXBeanSerializer:

Collaboration graph
[legend]

List of all members.

Classes

class  BeanData

Public Member Functions

boolean canSerialize (Class clazz, Class jsonClazz)
 ERXBeanSerializer (Class clazz)
Class<?>[] getJSONClasses ()
Class<?>[] getSerializableClasses ()
Object marshall (SerializerState state, Object p, Object o) throws MarshallException
ObjectMatch tryUnmarshall (SerializerState state, Class clazz, Object o) throws UnmarshallException
Object unmarshall (SerializerState state, Class clazz, Object o) throws UnmarshallException

Static Public Member Functions

static BeanData analyzeBean (Class<?> clazz) throws IntrospectionException
static BeanData getBeanData (Class<?> clazz) throws IntrospectionException

Static Package Functions

 [static initializer]

Private Attributes

Class _clazz

Static Private Attributes

static Set< String_ignoreMethodNames = new HashSet<String>()
static Class<?>[] _JSONClasses = new Class[] {}
static Map< Class<?>, BeanDatabeanCache = new HashMap<Class<?>, BeanData>()
static final Logger log = LoggerFactory.getLogger(ERXBeanSerializer.class)
static final long serialVersionUID = 2


Detailed Description

ERXBeanSerializer is a rip-off of BeanSerializer except that it supports WO-style naming (i.e. missing "get").

Constructor & Destructor Documentation

ERXBeanSerializer ( Class  clazz  ) 


Member Function Documentation

[static initializer] (  )  [static, package]

static BeanData analyzeBean ( Class<?>  clazz  )  throws IntrospectionException [static]

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
Exceptions:
IntrospectionException If a problem occurs during getting the bean info.

boolean canSerialize ( Class  clazz,
Class  jsonClazz 
)

static BeanData getBeanData ( Class<?>  clazz  )  throws IntrospectionException [static]

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
Exceptions:
IntrospectionException If a problem occurs during getting the bean info.

Class<?> [] getJSONClasses (  ) 

Class<?> [] getSerializableClasses (  ) 

Object marshall ( SerializerState  state,
Object  p,
Object  o 
) throws MarshallException

ObjectMatch tryUnmarshall ( SerializerState  state,
Class  clazz,
Object  o 
) throws UnmarshallException

Object unmarshall ( SerializerState  state,
Class  clazz,
Object  o 
) throws UnmarshallException


Member Data Documentation

Class _clazz [private]

Set<String> _ignoreMethodNames = new HashSet<String>() [static, private]

Class<?> [] _JSONClasses = new Class[] {} [static, private]

Classes that this can serialise to.

TODO: Yay for bloat!

Map<Class<?>, BeanData> beanCache = new HashMap<Class<?>, BeanData>() [static, private]

Caches analysed beans

final Logger log = LoggerFactory.getLogger(ERXBeanSerializer.class) [static, private]

The logger for this class

final long serialVersionUID = 2 [static, private]

Unique serialisation id.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:41 2012 for Project Wonder by  doxygen 1.5.8