BeanDeserializer.
| Modifier and Type | Field and Description |
|---|---|
| protected SettableAnyProperty | _anySetter
Fallback setter used for handling any properties that are not mapped to regular setters. |
| protected JsonDeserializer | _arrayDelegateDeserializer
Deserializer that is used iff array-delegate-based creator is to be used for deserializing from JSON Object. |
| protected final Map | _backRefs
We may also have one or more back reference fields (usually zero or one). |
| protected final BeanPropertyMap | _beanProperties
Mapping of property names to properties, built when all properties to use have been successfully resolved. |
| protected final JavaType | _beanType
Declared type of the bean this deserializer handles. |
| protected JsonDeserializer | _delegateDeserializer
Deserializer that is used iff delegate-based creator is to be used for deserializing from JSON Object. |
| protected ExternalTypeHandler | _externalTypeIdHandler
Handler that we need if any of properties uses external type id. |
| protected final Set | _ignorableProps
In addition to properties that are set, we will also keep track of recognized but ignorable properties: these will be skipped without errors or warnings. |
| protected final boolean | _ignoreAllUnknown
Flag that can be set to ignore and skip unknown properties. |
| protected final Set | _includableProps
Keep track of the the properties that needs to be specifically included. |
| protected final ValueInjector[] | _injectables
List of |
| protected final boolean | _needViewProcesing
Flag that indicates that some aspect of deserialization depends on active view used (if any) |
| protected boolean | _nonStandardCreation
Flag that is set to mark cases where deserialization from Object value using otherwise "standard" property binding will need to use non-default creation method: namely, either "full" delegation (array-delegation does not apply), or properties-based Creator method is used. |
| protected final ObjectIdReader | _objectIdReader
If an Object Id is to be used for value handled by this deserializer, this reader is used for handling. |
| protected PropertyBasedCreator | _propertyBasedCreator
If the bean needs to be instantiated using constructor or factory method that takes one or more named properties as argument(s), this creator is used for instantiation. |
| protected final JsonFormat. | _serializationShape
Requested shape from bean class annotations. |
| protected transient HashMap | _subDeserializers
Lazily constructed map used to contain deserializers needed for polymorphic subtypes. |
| protected UnwrappedPropertyHandler | _unwrappedPropertyHandler
If one of properties has "unwrapped" value, we need separate helper object |
| protected final ValueInstantiator | _valueInstantiator
Object that handles details of constructing initial bean value (to which bind data to), unless instance is passed (via updateValue()) |
| protected boolean | _vanillaProcessing
Flag that indicates that no "special features" whatsoever are enabled, so the simplest processing is possible. |
| private static final long | |
| protected static final PropertyName |
| Access | Constructor and Description |
|---|---|
| protected | BeanDeserializerBase(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs, Set<String> ignorableProps, boolean ignoreAllUnknown, Set<String> includableProps, boolean hasViews)
Constructor used when initially building a deserializer
instance, given a |
| protected | |
| protected | |
| protected | |
| public | |
| public | BeanDeserializerBase(BeanDeserializerBase src, Set<String> ignorableProps, Set<String> includableProps)
|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | _convertObjectId(JsonParser p, DeserializationContext ctxt, Object rawId, JsonDeserializer<Object> idDeser)
Helper method we need to do necessary conversion from whatever native object id type is, into declared type that Jackson internals expect. |
| protected final JsonDeserializer | |
| protected abstract Object | |
| private JsonDeserializer | _findDelegateDeserializer(DeserializationContext ctxt, JavaType delegateType, AnnotatedWithParams delegateCreator)
|
| protected NameTransformer | _findPropertyUnwrapper(DeserializationContext ctxt, SettableBeanProperty prop)
Helper method called to see if given property might be so-called unwrapped property: these require special handling. |
| protected JsonDeserializer | _findSubclassDeserializer(DeserializationContext ctxt, Object bean, TokenBuffer unknownTokens)
Helper method called to (try to) locate deserializer for given sub-type of type that this deserializer handles. |
| protected BeanDeserializerBase | _handleByNameInclusion(DeserializationContext ctxt, AnnotationIntrospector intr, BeanDeserializerBase contextual, AnnotatedMember accessor)
|
| protected Object | _handleTypedObjectId(JsonParser p, DeserializationContext ctxt, Object pojo, Object rawId)
Offlined method called to handle "native" Object Id that has been read and known to be associated with given deserialized POJO. |
| protected void | _replaceProperty(BeanPropertyMap props, SettableBeanProperty[] creatorProps, SettableBeanProperty origProp, SettableBeanProperty newProp)
|
| protected SettableBeanProperty | _resolvedObjectIdProperty(DeserializationContext ctxt, SettableBeanProperty prop)
Method that wraps given property with |
| protected SettableBeanProperty | _resolveInnerClassValuedProperty(DeserializationContext ctxt, SettableBeanProperty prop)
Helper method that will handle gruesome details of dealing with properties that have non-static inner class as value... |
| protected SettableBeanProperty | _resolveManagedReferenceProperty(DeserializationContext ctxt, SettableBeanProperty prop)
Helper method called to see if given property is part of 'managed' property pair (managed + back reference), and if so, handle resolution details. |
| protected SettableBeanProperty | _resolveMergeAndNullSettings(DeserializationContext ctxt, SettableBeanProperty prop, PropertyMetadata propMetadata)
|
| protected abstract BeanDeserializerBase | asArrayDeserializer()
Fluent factory for creating a variant that can handle POJO output as a JSON Array. |
| public JsonDeserializer | createContextual(DeserializationContext
Deserialization context to access configuration, additional
deserializers that may be needed by this deserializer ctxt, BeanProperty Method, field or constructor parameter that represents the property
(and is used to assign deserialized value).
Should be available; but there may be cases where caller cannot provide it and
null is passed instead (in which case impls usually pass 'this' deserializer as is) property)Implements com. |
| public Iterator | creatorProperties()
Accessor for finding properties that represents values to pass through property-based creator method (constructor or factory method) |
| public Object | deserializeFromArray(JsonParser p, DeserializationContext ctxt)
Deprecated
Since 2.11 Should not be used: was never meant to be called by
code other than sub-classes (implementations), and implementations details
differ
|
| public Object | deserializeFromBoolean(JsonParser p, DeserializationContext ctxt)
Method called to deserialize POJO value from a JSON boolean value (true, false) |
| public Object | deserializeFromDouble(JsonParser p, DeserializationContext ctxt)
Method called to deserialize POJO value from a JSON floating-point number. |
| public Object | |
| public Object | |
| public abstract Object | deserializeFromObject(JsonParser p, DeserializationContext ctxt)
General version used when handling needs more advanced features. |
| protected Object | deserializeFromObjectId(JsonParser p, DeserializationContext ctxt)
Method called in cases where it looks like we got an Object Id to parse and use as a reference. |
| protected Object | |
| public Object | |
| protected Object | deserializeWithObjectId(JsonParser p, DeserializationContext ctxt)
Alternative deserialization method used when we expect to see Object Id; if so, we will need to ensure that the Id is seen before anything else, to ensure that it is available for solving references, even if JSON itself is not ordered that way. |
| public Object | deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer
Deserializer to use for handling type information typeDeserializer)Overrides com. |
| public SettableBeanProperty | findBackReference(String logicalName)
Overrides com. BeanDeserializerFactory to properly link
managed- and back-reference pairs.
|
| protected JsonDeserializer | findConvertingDeserializer(DeserializationContext ctxt, SettableBeanProperty prop)
Helper method that can be used to see if specified property is annotated to indicate use of a converter for property value (in case of container types, it is container type itself, not key or content type). |
| public SettableBeanProperty | |
| public SettableBeanProperty | findProperty(String propertyName)
Accessor for finding the property with given name, if POJO has one. |
| public SettableBeanProperty | findProperty(int propertyIndex)
Alternate find method that tries to locate a property with given
|
| public final Class | |
| public AccessPattern | getEmptyAccessPattern()
Overrides com. getEmptyValue(DeserializationContext), to check whether it needs
to be called just once (static values), or each time empty value is
needed.
|
| public Object | getEmptyValue(DeserializationContext ctxt)
Overrides com. |
| public Collection | getKnownPropertyNames()
Overrides com. toString will give external property
name.
|
| public AccessPattern | getNullAccessPattern()
Overrides com. Implements com. getNullValue(DeserializationContext), to check whether it needs
to be called just once (static values), or each time empty value is
needed.
|
| public ObjectIdReader | getObjectIdReader()
Overrides com. |
| public int | |
| public ValueInstantiator | |
| public JavaType | getValueType()
Overrides com. |
| public Class | handledType()
Overrides com. |
| protected void | handleIgnoredProperty(JsonParser p, DeserializationContext ctxt, Object beanOrClass, String propName)
Method called when an explicitly ignored property (one specified with a name to match, either by property annotation or class annotation) is encountered. |
| protected Object | handlePolymorphic(JsonParser
(optional) If not null, parser that has more properties to handle
(in addition to buffered properties); if null, all properties are passed
in buffer p, DeserializationContext ctxt, Object bean, TokenBuffer unknownTokens)
Method called in cases where we may have polymorphic deserialization
case: that is, type of Creator-constructed bean is not the type
of deserializer itself.
|
| protected Object | handlePolymorphic(JsonParser
(optional) If not null, parser that has more properties to handle
(in addition to buffered properties); if null, all properties are passed
in buffer p, DeserializationContext ctxt, StreamReadConstraints streamReadConstraints, Object bean, TokenBuffer unknownTokens)Method called in cases where we may have polymorphic deserialization case: that is, type of Creator-constructed bean is not the type of deserializer itself. |
| protected Object | handleUnknownProperties(DeserializationContext ctxt, Object bean, TokenBuffer unknownTokens)
Method called to handle set of one or more unknown properties,
stored in their entirety in given |
| protected void | handleUnknownProperty(JsonParser
Parser that points to value of the unknown property p, DeserializationContext Context for deserialization; allows access to the parser,
error reporting functionality ctxt, Object Instance that is being populated by this
deserializer, or if not known, Class that would be instantiated.
If null, will assume type is what beanOrClass, String getValueClass returns.Name of the property that cannot be mapped propName)Overrides com. |
| protected void | handleUnknownVanilla(JsonParser p, DeserializationContext ctxt, Object
Either POJO instance (if constructed), or builder
(in case of builder-based approach), that has property we haven't been
able to handle yet. beanOrBuilder, String propName)Helper method called for an unknown property, when using "vanilla" processing. |
| public boolean | |
| public boolean | |
| protected void | |
| public boolean | isCachable()
Overrides com. |
| public boolean | Returns: True if this deserializer should match property names without considering casing; false if case has to match exactly.Accessor for checking whether this deserializer is operating in case-insensitive manner. |
| public LogicalType | logicalType()
Overrides com. |
| public Iterator | properties()
Accessor for iterating over properties this deserializer uses; with
the exception that properties passed via Creator methods
(specifically, "property-based constructor") are not included,
but can be accessed separate by calling
|
| public void | replaceProperty(SettableBeanProperty
Property to replace original, SettableBeanProperty Property to replace it with replacement)Method that can be used to replace an existing property with a modified one. |
| public void | resolve(DeserializationContext
Context to use for accessing configuration, resolving
secondary deserializers ctxt)Implements com. |
| public Boolean | supportsUpdate(DeserializationConfig config)
Overrides com. |
| private Throwable | |
| public abstract JsonDeserializer | unwrappingDeserializer(NameTransformer unwrapper)
Overrides com. |
| public BeanDeserializerBase | withBeanProperties(BeanPropertyMap props)
Mutant factory method that custom sub-classes must override; not left as abstract to prevent more drastic backwards compatibility problems. |
| public abstract BeanDeserializerBase | |
| public BeanDeserializerBase | withIgnorableProperties(Set<String> ignorableProps)
Deprecated
Since 2.12 use
withByNameInclusion instead
|
| public abstract BeanDeserializerBase | |
| public abstract BeanDeserializerBase | |
| public void | wrapAndThrow(Throwable t, Object bean, String fieldName, DeserializationContext ctxt)
Method that will modify caught exception (passed in as argument)
as necessary to include reference information, and to ensure it
is a subtype of |
| protected Object |