Class BeanSerializerBuilder
java.lang.Object
org.codehaus.jackson.map.ser.BeanSerializerBuilder
Builder class used for aggregating deserialization information about
a POJO, in order to build a
JsonSerializer for serializing
intances.
Main reason for using separate builder class is that this makes it easier
to make actual serializer class fully immutable.- Since:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AnyGetterWriterWriter used for "any getter" properties, if any.protected final BasicBeanDescriptionprotected BeanPropertyWriter[]Optional array of filtered property writers; if null, no view-based filtering is performed.protected ObjectId of the property filter to use for POJO, if any.protected List<BeanPropertyWriter> Bean properties, in order of serialization -
Constructor Summary
ConstructorsModifierConstructorDescriptionBeanSerializerBuilder(BasicBeanDescription beanDesc) protectedCopy-constructor that may be used for sub-classing -
Method Summary
Modifier and TypeMethodDescriptionbuild()Method called to createBeanSerializerinstance with all accumulated information.Factory method for constructing an "empty" serializer; one that outputs no properties (but handles JSON objects properly, including type information)booleanvoidsetAnyGetter(AnyGetterWriter anyGetter) voidsetFilteredProperties(BeanPropertyWriter[] properties) voidsetFilterId(Object filterId) voidsetProperties(List<BeanPropertyWriter> properties)
-
Field Details
-
_beanDesc
-
_properties
Bean properties, in order of serialization -
_filteredProperties
Optional array of filtered property writers; if null, no view-based filtering is performed. -
_anyGetter
Writer used for "any getter" properties, if any. -
_filterId
Id of the property filter to use for POJO, if any.
-
-
Constructor Details
-
BeanSerializerBuilder
-
BeanSerializerBuilder
Copy-constructor that may be used for sub-classing
-
-
Method Details
-
getBeanDescription
-
getProperties
-
getFilteredProperties
-
hasProperties
public boolean hasProperties()- Since:
- 1.9
-
setProperties
-
setFilteredProperties
-
setAnyGetter
-
setFilterId
-
build
Method called to createBeanSerializerinstance with all accumulated information. Will construct a serializer if we have enough information, or return null if not. -
createDummy
Factory method for constructing an "empty" serializer; one that outputs no properties (but handles JSON objects properly, including type information)
-