Note on implementation: much of code has been copied from
BeanDeserializer
; there may be opportunities to
refactor this in future.
Modifier and Type | Field and Description |
---|---|
protected final AnnotatedMethod | |
protected final JavaType | _targetType
Type that the builder will produce, target type; as opposed to `handledType()` which refers to Builder class. |
private static final long |
Access | Constructor and Description |
---|---|
public | BuilderBasedDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, JavaType targetType, BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs, Set<String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews)
Constructor used by |
public | BuilderBasedDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, JavaType targetType, BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs, Set<String> ignorableProps, boolean ignoreAllUnknown, Set<String> includableProps, boolean hasViews)
|
public | BuilderBasedDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs, Set<String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews)
Deprecated
Since 2.9
|
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. |
protected | |
protected | |
public | |
public | |
public | BuilderBasedDeserializer(BuilderBasedDeserializer src, Set<String> ignorableProps, Set<String> includableProps)
|
public |
Modifier and Type | Method and Description |
---|---|
protected final Object | |
protected Object | _deserializeFromArray(JsonParser p, DeserializationContext ctxt)
Overrides com. Helper method that allows easy support for array-related coercion features:
checks for either empty array, or single-value array-wrapped value (if coercion
enabled by |
protected Object | Returns: Builder instance constructedImplements abstract com. 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()
Implements abstract com. Fluent factory for creating a variant that can handle POJO output as a JSON Array. |
public Object | deserialize(JsonParser
Parser used for reading JSON content p, DeserializationContext Context that can be used to access information about
this deserialization activity. ctxt)Implements abstract com. Main deserialization method for bean-based objects (POJOs). |
public Object | deserialize(JsonParser p, DeserializationContext ctxt, Object value)
Overrides com. 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. |
public Object | deserializeFromObject(JsonParser p, DeserializationContext ctxt)
Implements abstract com. General version used when handling needs more advanced features. |
protected Object | |
protected Object | |
protected Object | |
protected Object | |
protected Object | deserializeWithUnwrapped(JsonParser p, DeserializationContext ctxt)
Method called when there are declared "unwrapped" properties which need special handling |
protected Object | deserializeWithUnwrapped(JsonParser p, DeserializationContext ctxt, Object builder, TokenBuffer tokens)
|
protected final Object | |
protected Object | |
public Boolean | supportsUpdate(DeserializationConfig config)
Overrides com. Introspection method that may be called to see whether deserializer supports update of an existing value (aka "merging") or not. |
public JsonDeserializer | unwrappingDeserializer(NameTransformer unwrapper)
Implements abstract com. 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 final Object | vanillaDeserialize(JsonParser p, DeserializationContext ctxt, JsonToken t)
Streamlined version that is only used when no "special" features are enabled. |
public BeanDeserializerBase | withBeanProperties(BeanPropertyMap props)
Overrides com. Mutant factory method that custom sub-classes must override; not left as abstract to prevent more drastic backwards compatibility problems. |
public BeanDeserializerBase | withByNameInclusion(Set<String> ignorableProps, Set<String> includableProps)
Implements abstract com.
|
public BeanDeserializerBase | withIgnoreAllUnknown(boolean ignoreUnknown)
Implements abstract com.
|
public BeanDeserializerBase | withObjectIdReader(ObjectIdReader oir)
Implements abstract com.
|
_buildMethod | back to summary |
---|---|
protected final AnnotatedMethod _buildMethod |
_targetType | back to summary |
---|---|
protected final JavaType _targetType Type that the builder will produce, target type; as opposed to `handledType()` which refers to Builder class.
|
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID Hides com. |
BuilderBasedDeserializer | back to summary |
---|---|
public BuilderBasedDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, JavaType targetType, BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs, Set<String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews) Constructor used by |
BuilderBasedDeserializer | back to summary |
---|---|
public BuilderBasedDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, JavaType targetType, BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs, Set<String> ignorableProps, boolean ignoreAllUnknown, Set<String> includableProps, boolean hasViews)
|
BuilderBasedDeserializer | back to summary |
---|---|
public BuilderBasedDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs, Set<String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews)
Deprecated Since 2.9
|
BuilderBasedDeserializer | back to summary |
---|---|
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 | back to summary |
---|---|
protected BuilderBasedDeserializer(BuilderBasedDeserializer src, boolean ignoreAllUnknown) |
BuilderBasedDeserializer | back to summary |
---|---|
protected BuilderBasedDeserializer(BuilderBasedDeserializer src, NameTransformer unwrapper) |
BuilderBasedDeserializer | back to summary |
---|---|
public BuilderBasedDeserializer(BuilderBasedDeserializer src, ObjectIdReader oir) |
BuilderBasedDeserializer | back to summary |
---|---|
public BuilderBasedDeserializer(BuilderBasedDeserializer src, Set<String> ignorableProps) |
BuilderBasedDeserializer | back to summary |
---|---|
public BuilderBasedDeserializer(BuilderBasedDeserializer src, Set<String> ignorableProps, Set<String> includableProps) |
BuilderBasedDeserializer | back to summary |
---|---|
public BuilderBasedDeserializer(BuilderBasedDeserializer src, BeanPropertyMap props) |
_deserialize | back to summary |
---|---|
protected final Object _deserialize(JsonParser p, DeserializationContext ctxt, Object builder) throws IOException |
_deserializeFromArray | back to summary |
---|---|
protected Object _deserializeFromArray(JsonParser p, DeserializationContext ctxt) throws IOException Overrides com. Doc from com. Helper method that allows easy support for array-related coercion features:
checks for either empty array, or single-value array-wrapped value (if coercion
enabled by This method should NOT be called if Array representation is explicitly supported for type: it should only be called in case it is otherwise unrecognized. Note in case of unwrapped single element, will handle actual decoding
by calling
|
_deserializeUsingPropertyBased | back to summary |
---|---|
protected Object _deserializeUsingPropertyBased(final JsonParser p, final DeserializationContext ctxt) throws IOException Implements abstract com. 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. The trick is that values for creator method need to be buffered, first; and due to non-guaranteed ordering possibly some other properties as well. |
asArrayDeserializer | back to summary |
---|---|
protected BeanDeserializerBase asArrayDeserializer() Implements abstract com. Doc from com. Fluent factory for creating a variant that can handle POJO output as a JSON Array. Implementations may ignore this request if no such input is possible.
|
deserialize | back to summary |
---|---|
public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException Implements abstract com. Main deserialization method for bean-based objects (POJOs).
|
deserialize | back to summary |
---|---|
public Object deserialize(JsonParser p, DeserializationContext ctxt, Object value) throws IOException Overrides com. 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.
|
deserializeFromObject | back to summary |
---|---|
public Object deserializeFromObject(JsonParser p, DeserializationContext ctxt) throws IOException Implements abstract com. General version used when handling needs more advanced features.
|
deserializeUsingPropertyBasedWithExternalTypeId | back to summary |
---|---|
protected Object deserializeUsingPropertyBasedWithExternalTypeId(JsonParser p, DeserializationContext ctxt) throws IOException |
deserializeUsingPropertyBasedWithUnwrapped | back to summary |
---|---|
protected Object deserializeUsingPropertyBasedWithUnwrapped(JsonParser p, DeserializationContext ctxt) throws IOException
|
deserializeWithExternalTypeId | back to summary |
---|---|
protected Object deserializeWithExternalTypeId(JsonParser p, DeserializationContext ctxt) throws IOException |
deserializeWithExternalTypeId | back to summary |
---|---|
protected Object deserializeWithExternalTypeId(JsonParser p, DeserializationContext ctxt, Object bean) throws IOException |
deserializeWithUnwrapped | back to summary |
---|---|
protected Object deserializeWithUnwrapped(JsonParser p, DeserializationContext ctxt) throws IOException Method called when there are declared "unwrapped" properties which need special handling
|
deserializeWithUnwrapped | back to summary |
---|---|
protected Object deserializeWithUnwrapped(JsonParser p, DeserializationContext ctxt, Object builder, TokenBuffer tokens) throws IOException |
deserializeWithView | back to summary |
---|---|
protected final Object deserializeWithView(JsonParser p, DeserializationContext ctxt, Object bean, Class<?> activeView) throws IOException |
finishBuild | back to summary |
---|---|
protected Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException |
supportsUpdate | back to summary |
---|---|
public Boolean supportsUpdate(DeserializationConfig config) Overrides com. Doc from com. Introspection method that may be called to see whether deserializer supports
update of an existing value (aka "merging") or not. Return value should either
be
Information gathered is typically used to either prevent merging update for
property (either by skipping, if based on global defaults; or by exception during
deserializer construction if explicit attempt made) if
Default implementation returns
|
unwrappingDeserializer | back to summary |
---|---|
public JsonDeserializer Implements abstract com. Doc from com. 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. Default implementation just returns 'this' indicating that no unwrapped variant exists
|
vanillaDeserialize | back to summary |
---|---|
private final Object vanillaDeserialize(JsonParser p, DeserializationContext ctxt, JsonToken t) throws IOException Streamlined version that is only used when no "special" features are enabled. |
withBeanProperties | back to summary |
---|---|
public BeanDeserializerBase withBeanProperties(BeanPropertyMap props) Overrides com. Doc from com. Mutant factory method that custom sub-classes must override; not left as abstract to prevent more drastic backwards compatibility problems.
|
withByNameInclusion | back to summary |
---|---|
public BeanDeserializerBase withByNameInclusion(Set<String> ignorableProps, Set<String> includableProps) Implements abstract com.
|
withIgnoreAllUnknown | back to summary |
---|---|
public BeanDeserializerBase withIgnoreAllUnknown(boolean ignoreUnknown) Implements abstract com.
|
withObjectIdReader | back to summary |
---|---|
public BeanDeserializerBase withObjectIdReader(ObjectIdReader oir) Implements abstract com.
|