Package org.codehaus.jackson.map.ser
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 AnyGetterWriter
Writer used for "any getter" properties, if any.protected final BasicBeanDescription
protected BeanPropertyWriter[]
Optional array of filtered property writers; if null, no view-based filtering is performed.protected Object
Id of the property filter to use for POJO, if any.protected List
<BeanPropertyWriter> Bean properties, in order of serialization -
Constructor Summary
ConstructorsModifierConstructorDescriptionBeanSerializerBuilder
(BasicBeanDescription beanDesc) protected
Copy-constructor that may be used for sub-classing -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Method called to createBeanSerializer
instance with all accumulated information.Factory method for constructing an "empty" serializer; one that outputs no properties (but handles JSON objects properly, including type information)boolean
void
setAnyGetter
(AnyGetterWriter anyGetter) void
setFilteredProperties
(BeanPropertyWriter[] properties) void
setFilterId
(Object filterId) void
setProperties
(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 createBeanSerializer
instance 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)
-