org.codehaus.jackson.map.ser
Class PropertyBuilder

java.lang.Object
  extended by org.codehaus.jackson.map.ser.PropertyBuilder

public class PropertyBuilder
extends Object

Helper class for BeanSerializerFactory that is used to construct BeanPropertyWriter instances. Can be sub-classed to change behavior.


Field Summary
protected  Object _defaultBean
          If a property has serialization inclusion value of JsonSerialize.Inclusion.ALWAYS, we need to know the default value of the bean, to know if property value equals default one.
 
Constructor Summary
PropertyBuilder(SerializationConfig config, BasicBeanDescription beanDesc)
           
 
Method Summary
protected  BeanPropertyWriter _buildProperty(String name, JsonSerializer<Object> ser, boolean defaultUseStaticTyping, Annotated a, Method m, Field f)
           
protected  Object _throwWrapped(Exception e, String propName, Object defaultBean)
           
 BeanPropertyWriter buildProperty(String name, JsonSerializer<Object> ser, AnnotatedField af, boolean defaultUseStaticTyping)
          Factory method for constructor a BeanPropertyWriter that uses specified method as the accessors.
 BeanPropertyWriter buildProperty(String name, JsonSerializer<Object> ser, AnnotatedMethod am, boolean defaultUseStaticTyping)
          Factory method for constructor a BeanPropertyWriter that uses specified method as the accessors.
protected  Class<?> findSerializationType(Annotated a, boolean useStaticTyping)
           
protected  Object getDefaultBean()
           
protected  Object getDefaultValue(String name, Method m, Field f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_defaultBean

protected Object _defaultBean
If a property has serialization inclusion value of JsonSerialize.Inclusion.ALWAYS, we need to know the default value of the bean, to know if property value equals default one.

Constructor Detail

PropertyBuilder

public PropertyBuilder(SerializationConfig config,
                       BasicBeanDescription beanDesc)
Method Detail

buildProperty

public BeanPropertyWriter buildProperty(String name,
                                        JsonSerializer<Object> ser,
                                        AnnotatedMethod am,
                                        boolean defaultUseStaticTyping)
Factory method for constructor a BeanPropertyWriter that uses specified method as the accessors.

Parameters:
defaultUseStaticTyping - Whether default typing mode is 'static' or not (if not, it's 'dynamic'); can be overridden by annotation related to property itself

buildProperty

public BeanPropertyWriter buildProperty(String name,
                                        JsonSerializer<Object> ser,
                                        AnnotatedField af,
                                        boolean defaultUseStaticTyping)
Factory method for constructor a BeanPropertyWriter that uses specified method as the accessors.

Parameters:
defaultUseStaticTyping - Whether default typing mode is 'static' or not (if not, it's 'dynamic'); can be overridden by annotation related to property itself

_buildProperty

protected BeanPropertyWriter _buildProperty(String name,
                                            JsonSerializer<Object> ser,
                                            boolean defaultUseStaticTyping,
                                            Annotated a,
                                            Method m,
                                            Field f)

findSerializationType

protected Class<?> findSerializationType(Annotated a,
                                         boolean useStaticTyping)

getDefaultBean

protected Object getDefaultBean()

getDefaultValue

protected Object getDefaultValue(String name,
                                 Method m,
                                 Field f)

_throwWrapped

protected Object _throwWrapped(Exception e,
                               String propName,
                               Object defaultBean)