Class BeanDeserializerBuilder
java.lang.Object
com.fasterxml.jackson.databind.deser.BeanDeserializerBuilder
Builder class used for aggregating deserialization information about
a POJO, in order to build a
JsonDeserializer for deserializing
instances.-
Constructor Summary
ConstructorsConstructorDescriptionBeanDeserializerBuilder(BeanDescription beanDesc, DeserializationContext ctxt) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBackReferenceProperty(String referenceName, SettableBeanProperty prop) Method called to add a property that represents so-called back reference; reference that "points back" to object that has forward reference to currently built bean.voidMethod called by deserializer factory, when a "creator property" (something that is passed via constructor- or factory method argument; instead of setter or field).voidaddIgnorable(String propName) Method that will add property name as one of properties that can be ignored if not recognized.voidaddIncludable(String propName) Method that will add property name as one of the properties that will be included.voidaddInjectable(PropertyName propName, JavaType propType, Annotations contextAnnotations, AnnotatedMember member, Object valueId) voidaddOrReplaceProperty(SettableBeanProperty prop, boolean allowOverride) Method for adding a new property or replacing a property.voidMethod to add a property setter.build()Method for constructing aBeanDeserializer, given all information collected.Alternate build method used when we must be using some form of abstract resolution, usually by using addition Type Id ("polymorphic deserialization")buildBuilderBased(JavaType valueType, String expBuildMethodName) Method for constructing a specialized deserializer that uses additional external Builder object during data binding.findProperty(PropertyName propertyName) Method that allows accessing all properties that this builder currently contains.booleanhasIgnorable(String name) booleanhasProperty(PropertyName propertyName) removeProperty(PropertyName name) voidvoidsetIgnoreUnknownProperties(boolean ignore) voidvoidsetPOJOBuilder(AnnotatedMethod buildMethod, JsonPOJOBuilder.Value config) void
-
Constructor Details
-
BeanDeserializerBuilder
-
-
Method Details
-
addOrReplaceProperty
Method for adding a new property or replacing a property. -
addProperty
Method to add a property setter. Will ensure that there is no unexpected override; if one is found will throw aIllegalArgumentException. -
addBackReferenceProperty
public void addBackReferenceProperty(String referenceName, SettableBeanProperty prop) throws JsonMappingException Method called to add a property that represents so-called back reference; reference that "points back" to object that has forward reference to currently built bean.- Throws:
JsonMappingException
-
addInjectable
public void addInjectable(PropertyName propName, JavaType propType, Annotations contextAnnotations, AnnotatedMember member, Object valueId) throws JsonMappingException - Throws:
JsonMappingException
-
addIgnorable
Method that will add property name as one of properties that can be ignored if not recognized. -
addIncludable
Method that will add property name as one of the properties that will be included.- Since:
- 2.12
-
addCreatorProperty
Method called by deserializer factory, when a "creator property" (something that is passed via constructor- or factory method argument; instead of setter or field).Default implementation does not do anything; we may need to revisit this decision if these properties need to be available through accessors. For now, however, we just have to ensure that we don't try to resolve types that masked setter/field has (see [JACKSON-700] for details).
-
setAnySetter
-
setIgnoreUnknownProperties
public void setIgnoreUnknownProperties(boolean ignore) -
setValueInstantiator
-
setObjectIdReader
-
setPOJOBuilder
-
getProperties
Method that allows accessing all properties that this builder currently contains.Note that properties are returned in order that properties are ordered (explictly, or by rule), which is the serialization order.
-
findProperty
-
hasProperty
-
removeProperty
-
getAnySetter
-
getValueInstantiator
-
getInjectables
-
getObjectIdReader
-
getBuildMethod
-
getBuilderConfig
-
hasIgnorable
- Since:
- 2.9.4
-
build
Method for constructing aBeanDeserializer, given all information collected.- Throws:
JsonMappingException
-
buildAbstract
Alternate build method used when we must be using some form of abstract resolution, usually by using addition Type Id ("polymorphic deserialization")- Since:
- 2.0
-
buildBuilderBased
public JsonDeserializer<?> buildBuilderBased(JavaType valueType, String expBuildMethodName) throws JsonMappingException Method for constructing a specialized deserializer that uses additional external Builder object during data binding.- Throws:
JsonMappingException
-