Class BeanSerializerBuilder
java.lang.Object
com.fasterxml.jackson.databind.ser.BeanSerializerBuilder
Builder class used for aggregating deserialization information about
a POJO, in order to build a
JsonSerializer for serializing
instances.
Main reason for using separate builder class is that this makes it easier
to make actual serializer class fully immutable.-
Constructor Summary
Constructors -
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) voidvoidsetProperties(List<BeanPropertyWriter> properties) voidsetTypeId(AnnotatedMember idProp)
-
Constructor Details
-
BeanSerializerBuilder
-
-
Method Details
-
setProperties
-
setFilteredProperties
- Parameters:
properties- Number and order of properties here MUST match that of "regular" properties set earlier usingsetProperties(List); if not, anIllegalArgumentExceptionwill be thrown
-
setAnyGetter
-
setFilterId
-
setTypeId
-
setObjectIdWriter
-
getClassInfo
-
getBeanDescription
-
getProperties
-
hasProperties
public boolean hasProperties() -
getFilteredProperties
-
getAnyGetter
-
getFilterId
-
getTypeId
-
getObjectIdWriter
-
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)
-