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  Object _throwWrapped(Exception e, String propName, Object defaultBean)
           
protected  BeanPropertyWriter buildProperty(String name, JsonSerializer<Object> ser, TypeSerializer typeSer, TypeSerializer contentTypeSer, AnnotatedMember am, boolean defaultUseStaticTyping)
           
protected  JavaType findSerializationType(Annotated a, boolean useStaticTyping)
          Method that will try to determine statically defined type of property being serialized, based on annotations (for overrides), and alternatively declared type (if static typing for serialization is enabled).
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

protected BeanPropertyWriter buildProperty(String name,
                                           JsonSerializer<Object> ser,
                                           TypeSerializer typeSer,
                                           TypeSerializer contentTypeSer,
                                           AnnotatedMember am,
                                           boolean defaultUseStaticTyping)
Parameters:
contentTypeSer - Optional explicit type information serializer to use for contained values (only used for properties that are of container type)

findSerializationType

protected JavaType findSerializationType(Annotated a,
                                         boolean useStaticTyping)
Method that will try to determine statically defined type of property being serialized, based on annotations (for overrides), and alternatively declared type (if static typing for serialization is enabled). If neither can be used (no annotations, dynamic typing), returns null.


getDefaultBean

protected Object getDefaultBean()

getDefaultValue

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

_throwWrapped

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