java.lang.Object
tools.jackson.databind.deser.BeanDeserializerBuilder
Builder class used for aggregating deserialization information about
a property-based POJO, in order to build a
ValueDeserializer
for deserializing POJO instances.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SettableAnyPropertyFallback setter used for handling any properties that are not mapped to regular setters.protected HashMap<String,SettableBeanProperty> Back-reference properties this bean contains (if any)protected final BeanDescription.SupplierIntrospected information about POJO for deserializer to handleprotected JsonPOJOBuilder.ValueIn addition, Builder may have additional configurationprotected AnnotatedMethodWhen creating Builder-based deserializers, this indicates method to call on builder to finalize value.protected final DeserializationConfigprotected final DeserializationContextSet of names of properties that are recognized but are to be ignored for deserialization purposes (meaning no exception is thrown, value is just skipped).protected booleanFlag that can be set to ignore and skip unknown properties.Set of names of properties that are recognized and are set to be included for deserialization purposes (null deactivate this, empty includes nothing).protected List<ValueInjector>Value injectors for deserializationprotected ObjectIdReaderHandler for Object Id values, if Object Ids are enabled for the bean type.protected final Map<String,SettableBeanProperty> Properties to deserialize collected so far.protected SettableBeanProperty[]Parameters of the primary properties-based Creator, if any.protected ValueInstantiatorObject that will handle value instantiation for the bean type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCopy constructor for sub-classes to use, when constructing custom builder instancesBeanDeserializerBuilder(DeserializationContext ctxt, BeanDescription.Supplier beanDescRef) -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<SettableBeanProperty>_addIdProp(Map<String, SettableBeanProperty> props, SettableBeanProperty idProp) protected boolean_anyViews(Collection<SettableBeanProperty> props) protected PropertyName[][]protected BeanPropertyMapprotected void_fixAccess(Collection<SettableBeanProperty> mainProps) protected voidHelper method for linking root cause to "invalid type definition" exception; needed for troubleshooting issues with forcing access on later JDKs (as module definition boundaries are more strictly enforced).voidaddBackReferenceProperty(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, Boolean optional, Boolean useInput) 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.protected ValueDeserializer<?>createBuilderBasedDeserializer(JavaType valueType, BeanPropertyMap propertyMap, boolean anyViews) Extension point for overriding the actual creation of the builder deserializer.findProperty(PropertyName propertyName) Method that allows accessing all properties that this builder currently contains.getType()booleanhasIgnorable(String name) booleanhasProperty(PropertyName propertyName) removeProperty(PropertyName name) voidvoidsetIgnoreUnknownProperties(boolean ignore) voidvoidsetPOJOBuilder(AnnotatedMethod buildMethod, JsonPOJOBuilder.Value config) void
-
Field Details
-
_config
-
_context
-
_beanDescRef
Introspected information about POJO for deserializer to handle -
_properties
Properties to deserialize collected so far. -
_propsBasedCreatorParams
Parameters of the primary properties-based Creator, if any.- Since:
- 2.18
-
_injectables
Value injectors for deserialization -
_backRefProperties
Back-reference properties this bean contains (if any) -
_ignorableProps
Set of names of properties that are recognized but are to be ignored for deserialization purposes (meaning no exception is thrown, value is just skipped). -
_includableProps
Set of names of properties that are recognized and are set to be included for deserialization purposes (null deactivate this, empty includes nothing). -
_valueInstantiator
Object that will handle value instantiation for the bean type. -
_objectIdReader
Handler for Object Id values, if Object Ids are enabled for the bean type. -
_anySetter
Fallback setter used for handling any properties that are not mapped to regular setters. If setter is not null, it will be called once for each such property. -
_ignoreAllUnknown
protected boolean _ignoreAllUnknownFlag that can be set to ignore and skip unknown properties. If set, will not throw an exception for unknown properties. -
_buildMethod
When creating Builder-based deserializers, this indicates method to call on builder to finalize value. -
_builderConfig
In addition, Builder may have additional configuration
-
-
Constructor Details
-
BeanDeserializerBuilder
-
BeanDeserializerBuilder
Copy constructor for sub-classes to use, when constructing custom builder instances
-
-
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
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. -
addInjectable
public void addInjectable(PropertyName propName, JavaType propType, Annotations contextAnnotations, AnnotatedMember member, Object valueId, Boolean optional, Boolean useInput) -
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. -
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
-
getType
-
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
-
build
Method for constructing aBeanDeserializer, given all information collected. -
buildAbstract
Alternate build method used when we must be using some form of abstract resolution, usually by using addition Type Id ("polymorphic deserialization") -
buildBuilderBased
Method for constructing a specialized deserializer that uses additional external Builder object during data binding. -
createBuilderBasedDeserializer
protected ValueDeserializer<?> createBuilderBasedDeserializer(JavaType valueType, BeanPropertyMap propertyMap, boolean anyViews) Extension point for overriding the actual creation of the builder deserializer. -
_fixAccess
-
_addIdProp
protected Collection<SettableBeanProperty> _addIdProp(Map<String, SettableBeanProperty> props, SettableBeanProperty idProp) -
_anyViews
-
_constructPropMap
-
_collectAliases
-
_handleBadAccess
Helper method for linking root cause to "invalid type definition" exception; needed for troubleshooting issues with forcing access on later JDKs (as module definition boundaries are more strictly enforced).
-