com.fasterxml.jackson.databind.ser

## Class PropertyBuilder

- java.lang.Object
- - com.fasterxml.jackson.databind.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

Fields
`protected AnnotationIntrospector` `_annotationIntrospector`
`protected BeanDescription` `_beanDesc`
`protected SerializationConfig` `_config`
`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.
`protected com.fasterxml.jackson.annotation.JsonInclude.Include` `_outputProps`

### Constructor Summary

Constructors
Constructor and Description
`PropertyBuilder(SerializationConfig config, BeanDescription beanDesc)`

### Method Summary

Methods
`protected Object` `_throwWrapped(Exception e, String propName, Object defaultBean)`
`protected BeanPropertyWriter` `buildWriter(BeanPropertyDefinition propDef, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, TypeSerializer contentTypeSer, AnnotatedMember am, boolean defaultUseStaticTyping)` Deprecated. Since 2.3, use variant that takes `SerializerProvider` as first argument -- to be removed from 2.4
`protected BeanPropertyWriter` `buildWriter(SerializerProvider prov, BeanPropertyDefinition propDef, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, TypeSerializer contentTypeSer, AnnotatedMember am, boolean defaultUseStaticTyping)`
`protected JavaType` `findSerializationType(Annotated a, boolean useStaticTyping, JavaType declaredType)` 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).
`Annotations` `getClassAnnotations()`
`protected Object` `getDefaultBean()`
`protected Object` `getDefaultValue(String name, AnnotatedMember member)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### _config

    protected final SerializationConfig _config

#### _beanDesc

    protected final BeanDescription _beanDesc

#### _outputProps

    protected final com.fasterxml.jackson.annotation.JsonInclude.Include _outputProps

#### _annotationIntrospector

    protected final AnnotationIntrospector _annotationIntrospector

#### _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,
                   BeanDescription beanDesc)

### Method Detail

#### getClassAnnotations

    public Annotations getClassAnnotations()

#### buildWriter

    @Deprecated
    protected final BeanPropertyWriter buildWriter(BeanPropertyDefinition propDef,
                                            JavaType declaredType,
                                            JsonSerializer<?> ser,
                                            TypeSerializer typeSer,
                                            TypeSerializer contentTypeSer,
                                            AnnotatedMember am,
                                            boolean defaultUseStaticTyping)

Deprecated. Since 2.3, use variant that takes `SerializerProvider` as first argument -- to be removed from 2.4

#### buildWriter

    protected BeanPropertyWriter buildWriter(SerializerProvider prov,
                                 BeanPropertyDefinition propDef,
                                 JavaType declaredType,
                                 JsonSerializer<?> ser,
                                 TypeSerializer typeSer,
                                 TypeSerializer contentTypeSer,
                                 AnnotatedMember am,
                                 boolean defaultUseStaticTyping)
                                      throws JsonMappingException

Parameters:
  `contentTypeSer` - Optional explicit type information serializer to use for contained values (only used for properties that are of container type)
Throws:
  `JsonMappingException`

#### findSerializationType

    protected JavaType findSerializationType(Annotated a,
                                 boolean useStaticTyping,
                                 JavaType declaredType)

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,
                         AnnotatedMember member)

#### _throwWrapped

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