public class BuilderBasedDeserializer extends BeanDeserializerBase
Note on implementation: much of code has been copied from
BeanDeserializer; there may be opportunities to
refactor this in future.
JsonDeserializer.None| Modifier and Type | Field and Description |
|---|---|
protected AnnotatedMethod |
_buildMethod |
protected JavaType |
_targetType
Type that the builder will produce, target type; as opposed to
`handledType()` which refers to Builder class.
|
private static long |
serialVersionUID |
_anySetter, _arrayDelegateDeserializer, _backRefs, _beanProperties, _beanType, _delegateDeserializer, _externalTypeIdHandler, _ignorableProps, _ignoreAllUnknown, _injectables, _needViewProcesing, _nonStandardCreation, _objectIdReader, _propertyBasedCreator, _serializationShape, _subDeserializers, _unwrappedPropertyHandler, _valueInstantiator, _vanillaProcessing, TEMP_PROPERTY_NAME_valueClass, _valueType, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS| Modifier | Constructor and Description |
|---|---|
|
BuilderBasedDeserializer(BeanDeserializerBuilder builder,
BeanDescription beanDesc,
BeanPropertyMap properties,
java.util.Map<java.lang.String,SettableBeanProperty> backRefs,
java.util.Set<java.lang.String> ignorableProps,
boolean ignoreAllUnknown,
boolean hasViews)
Deprecated.
Since 2.9
|
|
BuilderBasedDeserializer(BeanDeserializerBuilder builder,
BeanDescription beanDesc,
JavaType targetType,
BeanPropertyMap properties,
java.util.Map<java.lang.String,SettableBeanProperty> backRefs,
java.util.Set<java.lang.String> ignorableProps,
boolean ignoreAllUnknown,
boolean hasViews)
Constructor used by
BeanDeserializerBuilder. |
protected |
BuilderBasedDeserializer(BuilderBasedDeserializer src)
Copy-constructor that can be used by sub-classes to allow
copy-on-write styling copying of settings of an existing instance.
|
|
BuilderBasedDeserializer(BuilderBasedDeserializer src,
BeanPropertyMap props) |
protected |
BuilderBasedDeserializer(BuilderBasedDeserializer src,
boolean ignoreAllUnknown) |
protected |
BuilderBasedDeserializer(BuilderBasedDeserializer src,
NameTransformer unwrapper) |
|
BuilderBasedDeserializer(BuilderBasedDeserializer src,
ObjectIdReader oir) |
|
BuilderBasedDeserializer(BuilderBasedDeserializer src,
java.util.Set<java.lang.String> ignorableProps) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
_deserialize(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
java.lang.Object builder) |
protected java.lang.Object |
_deserializeUsingPropertyBased(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
Method called to deserialize bean using "property-based creator":
this means that a non-default constructor or factory method is
called, and then possibly other setters.
|
protected BeanDeserializerBase |
asArrayDeserializer()
Fluent factory for creating a variant that can handle
POJO output as a JSON Array.
|
java.lang.Object |
deserialize(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
Main deserialization method for bean-based objects (POJOs).
|
java.lang.Object |
deserialize(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
java.lang.Object value)
Secondary deserialization method, called in cases where POJO
instance is created as part of deserialization, potentially
after collecting some or all of the properties to set.
|
java.lang.Object |
deserializeFromObject(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
General version used when handling needs more advanced
features.
|
protected java.lang.Object |
deserializeUsingPropertyBasedWithExternalTypeId(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt) |
protected java.lang.Object |
deserializeUsingPropertyBasedWithUnwrapped(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt) |
protected java.lang.Object |
deserializeWithExternalTypeId(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt) |
protected java.lang.Object |
deserializeWithExternalTypeId(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
java.lang.Object bean) |
protected java.lang.Object |
deserializeWithUnwrapped(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
Method called when there are declared "unwrapped" properties
which need special handling
|
protected java.lang.Object |
deserializeWithUnwrapped(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
java.lang.Object builder,
TokenBuffer tokens) |
protected java.lang.Object |
deserializeWithView(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
java.lang.Object bean,
java.lang.Class<?> activeView) |
protected java.lang.Object |
finishBuild(DeserializationContext ctxt,
java.lang.Object builder) |
java.lang.Boolean |
supportsUpdate(DeserializationConfig config)
Introspection method that may be called to see whether deserializer supports
update of an existing value (aka "merging") or not.
|
JsonDeserializer<java.lang.Object> |
unwrappingDeserializer(NameTransformer unwrapper)
Method that will return deserializer instance that is able
to handle "unwrapped" value instances
If no unwrapped instance can be constructed, will simply
return this object as-is.
|
private java.lang.Object |
vanillaDeserialize(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
com.fasterxml.jackson.core.JsonToken t)
Streamlined version that is only used when no "special"
features are enabled.
|
BeanDeserializerBase |
withBeanProperties(BeanPropertyMap props)
Mutant factory method that custom sub-classes must override; not left as
abstract to prevent more drastic backwards compatibility problems.
|
BeanDeserializerBase |
withIgnorableProperties(java.util.Set<java.lang.String> ignorableProps) |
BeanDeserializerBase |
withObjectIdReader(ObjectIdReader oir) |
_convertObjectId, _findPropertyUnwrapper, _findSubclassDeserializer, _handleTypedObjectId, _replaceProperty, _resolvedObjectIdProperty, _resolveInnerClassValuedProperty, _resolveManagedReferenceProperty, _resolveMergeAndNullSettings, createContextual, creatorProperties, deserializeFromArray, deserializeFromBoolean, deserializeFromDouble, deserializeFromEmbedded, deserializeFromNumber, deserializeFromObjectId, deserializeFromObjectUsingNonDefault, deserializeFromString, deserializeWithObjectId, deserializeWithType, findBackReference, findConvertingDeserializer, findProperty, findProperty, findProperty, getBeanClass, getEmptyAccessPattern, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getObjectIdReader, getPropertyCount, getValueInstantiator, getValueType, handledType, handleIgnoredProperty, handlePolymorphic, handleUnknownProperties, handleUnknownProperty, handleUnknownVanilla, hasProperty, hasViews, injectValues, isCachable, properties, replaceProperty, resolve, wrapAndThrow, wrapInstantiationProblem_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, handleMissingEndArrayForSingle, isDefaultDeserializer, isDefaultKeyDeserializer, parseDoubledeserializeWithType, getDelegatee, getEmptyValue, getNullValue, getNullValue, replaceDelegateeprivate static final long serialVersionUID
protected final AnnotatedMethod _buildMethod
protected final JavaType _targetType
public BuilderBasedDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, JavaType targetType, BeanPropertyMap properties, java.util.Map<java.lang.String,SettableBeanProperty> backRefs, java.util.Set<java.lang.String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews)
BeanDeserializerBuilder.@Deprecated public BuilderBasedDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, java.util.Map<java.lang.String,SettableBeanProperty> backRefs, java.util.Set<java.lang.String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews)
protected BuilderBasedDeserializer(BuilderBasedDeserializer src)
protected BuilderBasedDeserializer(BuilderBasedDeserializer src, boolean ignoreAllUnknown)
protected BuilderBasedDeserializer(BuilderBasedDeserializer src, NameTransformer unwrapper)
public BuilderBasedDeserializer(BuilderBasedDeserializer src, ObjectIdReader oir)
public BuilderBasedDeserializer(BuilderBasedDeserializer src, java.util.Set<java.lang.String> ignorableProps)
public BuilderBasedDeserializer(BuilderBasedDeserializer src, BeanPropertyMap props)
public JsonDeserializer<java.lang.Object> unwrappingDeserializer(NameTransformer unwrapper)
JsonDeserializerDefault implementation just returns 'this' indicating that no unwrapped variant exists
unwrappingDeserializer in class BeanDeserializerBasepublic BeanDeserializerBase withObjectIdReader(ObjectIdReader oir)
withObjectIdReader in class BeanDeserializerBasepublic BeanDeserializerBase withIgnorableProperties(java.util.Set<java.lang.String> ignorableProps)
withIgnorableProperties in class BeanDeserializerBasepublic BeanDeserializerBase withBeanProperties(BeanPropertyMap props)
BeanDeserializerBasewithBeanProperties in class BeanDeserializerBaseprotected BeanDeserializerBase asArrayDeserializer()
BeanDeserializerBaseasArrayDeserializer in class BeanDeserializerBasepublic java.lang.Boolean supportsUpdate(DeserializationConfig config)
JsonDeserializerBoolean.FALSE if update is not supported at all (immutable values);
Boolean.TRUE if update should usually work (regular POJOs, for example),
or null if this is either not known, or may sometimes work.
Information gathered is typically used to either prevent merging update for
property (either by skipping, if based on global defaults; or by exception during
deserialization construction if explicit attempt made) if Boolean.FALSE
returned, or inclusion if Boolean.TRUE is specified. If "unknown" case
(null returned) behavior is to exclude property if global defaults
used; or to allow if explicit per-type or property merging is defined.
Default implementation returns null to allow explicit per-type
or per-property attempts.
supportsUpdate in class BeanDeserializerBaseprotected java.lang.Object finishBuild(DeserializationContext ctxt, java.lang.Object builder) throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object deserialize(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
throws java.io.IOException
deserialize in class JsonDeserializer<java.lang.Object>p - Parsed used for reading JSON contentctxt - Context that can be used to access information about
this deserialization activity.java.io.IOExceptionpublic java.lang.Object deserialize(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
java.lang.Object value)
throws java.io.IOException
deserialize in class JsonDeserializer<java.lang.Object>java.io.IOExceptionprivate final java.lang.Object vanillaDeserialize(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
com.fasterxml.jackson.core.JsonToken t)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object deserializeFromObject(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
throws java.io.IOException
deserializeFromObject in class BeanDeserializerBasejava.io.IOExceptionprotected java.lang.Object _deserializeUsingPropertyBased(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
throws java.io.IOException
_deserializeUsingPropertyBased in class BeanDeserializerBasejava.io.IOExceptionprotected final java.lang.Object _deserialize(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
java.lang.Object builder)
throws java.io.IOException
java.io.IOExceptionprotected final java.lang.Object deserializeWithView(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
java.lang.Object bean,
java.lang.Class<?> activeView)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Object deserializeWithUnwrapped(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Object deserializeUsingPropertyBasedWithUnwrapped(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Object deserializeWithUnwrapped(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
java.lang.Object builder,
TokenBuffer tokens)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Object deserializeWithExternalTypeId(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Object deserializeWithExternalTypeId(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt,
java.lang.Object bean)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Object deserializeUsingPropertyBasedWithExternalTypeId(com.fasterxml.jackson.core.JsonParser p,
DeserializationContext ctxt)
throws java.io.IOException
java.io.IOException