public abstract class BasicDeserializerFactory extends DeserializerFactory implements java.io.Serializable
Collection
).
Since all simple deserializers are eagerly instantiated, and there is no additional introspection or customizability of these types, this factory is stateless.
Modifier and Type | Method and Description |
---|---|
ValueInstantiator |
_valueInstantiatorInstance(DeserializationConfig config,
Annotated annotated,
java.lang.Object instDef) |
JsonDeserializer<?> |
createArrayDeserializer(DeserializationContext ctxt,
ArrayType type,
BeanDescription beanDesc)
Method called to create (or, for completely immutable deserializers,
reuse) a deserializer that can convert JSON content into values of
specified Java type.
|
JsonDeserializer<?> |
createCollectionDeserializer(DeserializationContext ctxt,
CollectionType type,
BeanDescription beanDesc) |
JsonDeserializer<?> |
createCollectionLikeDeserializer(DeserializationContext ctxt,
CollectionLikeType type,
BeanDescription beanDesc) |
JsonDeserializer<?> |
createEnumDeserializer(DeserializationContext ctxt,
JavaType type,
BeanDescription beanDesc)
Factory method for constructing serializers of
Enum types. |
KeyDeserializer |
createKeyDeserializer(DeserializationContext ctxt,
JavaType type)
Method called to find if factory knows how to create a key deserializer
for specified type; currently this means checking if a module has registered
possible deserializers.
|
JsonDeserializer<?> |
createMapDeserializer(DeserializationContext ctxt,
MapType type,
BeanDescription beanDesc) |
JsonDeserializer<?> |
createMapLikeDeserializer(DeserializationContext ctxt,
MapLikeType type,
BeanDescription beanDesc) |
JsonDeserializer<?> |
createReferenceDeserializer(DeserializationContext ctxt,
ReferenceType type,
BeanDescription beanDesc) |
JsonDeserializer<?> |
createTreeDeserializer(DeserializationConfig config,
JavaType nodeType,
BeanDescription beanDesc)
Method called to create and return a deserializer that can construct
JsonNode(s) from JSON content.
|
JsonDeserializer<?> |
findDefaultDeserializer(DeserializationContext ctxt,
JavaType type,
BeanDescription beanDesc)
Helper method called to find one of default serializers for "well-known"
platform types: JDK-provided types, and small number of public Jackson
API types.
|
TypeDeserializer |
findPropertyContentTypeDeserializer(DeserializationConfig config,
JavaType containerType,
AnnotatedMember propertyEntity)
Method called to find and create a type information deserializer for values of
given container (list, array, map) property, if one is needed.
|
TypeDeserializer |
findPropertyTypeDeserializer(DeserializationConfig config,
JavaType baseType,
AnnotatedMember annotated)
Method called to create a type information deserializer for values of
given non-container property, if one is needed.
|
TypeDeserializer |
findTypeDeserializer(DeserializationConfig config,
JavaType baseType)
Method called to find and create a type information deserializer for given base type,
if one is needed.
|
ValueInstantiator |
findValueInstantiator(DeserializationContext ctxt,
BeanDescription beanDesc)
Value instantiator is created both based on creator annotations,
and on optional externally provided instantiators (registered through
module interface).
|
DeserializerFactoryConfig |
getFactoryConfig()
Method for getting current
DeserializerFactoryConfig . |
JavaType |
mapAbstractType(DeserializationConfig config,
JavaType type)
Method that can be called to try to resolve an abstract type
(interface, abstract class) into a concrete type, or at least
something "more concrete" (abstract class instead of interface).
|
DeserializerFactory |
withAbstractTypeResolver(AbstractTypeResolver resolver)
Convenience method for creating a new factory instance with additional
AbstractTypeResolver . |
DeserializerFactory |
withAdditionalDeserializers(Deserializers additional)
Convenience method for creating a new factory instance with additional deserializer
provider.
|
DeserializerFactory |
withAdditionalKeyDeserializers(KeyDeserializers additional)
Convenience method for creating a new factory instance with additional
KeyDeserializers . |
DeserializerFactory |
withDeserializerModifier(BeanDeserializerModifier modifier)
Convenience method for creating a new factory instance with additional
BeanDeserializerModifier . |
DeserializerFactory |
withValueInstantiators(ValueInstantiators instantiators)
Convenience method for creating a new factory instance with additional
ValueInstantiators . |
createBeanDeserializer, createBuilderBasedDeserializer
public DeserializerFactoryConfig getFactoryConfig()
DeserializerFactoryConfig
.
Note that since instances are immutable, you can NOT change settings by accessing an instance and calling methods: this will simply create new instance of config object.
public final DeserializerFactory withAdditionalDeserializers(Deserializers additional)
withAdditionalDeserializers
in class DeserializerFactory
public final DeserializerFactory withAdditionalKeyDeserializers(KeyDeserializers additional)
KeyDeserializers
.withAdditionalKeyDeserializers
in class DeserializerFactory
public final DeserializerFactory withDeserializerModifier(BeanDeserializerModifier modifier)
BeanDeserializerModifier
.withDeserializerModifier
in class DeserializerFactory
public final DeserializerFactory withAbstractTypeResolver(AbstractTypeResolver resolver)
AbstractTypeResolver
.withAbstractTypeResolver
in class DeserializerFactory
public final DeserializerFactory withValueInstantiators(ValueInstantiators instantiators)
ValueInstantiators
.withValueInstantiators
in class DeserializerFactory
public JavaType mapAbstractType(DeserializationConfig config, JavaType type) throws JsonMappingException
DeserializerFactory
mapAbstractType
in class DeserializerFactory
JsonMappingException
public ValueInstantiator findValueInstantiator(DeserializationContext ctxt, BeanDescription beanDesc) throws JsonMappingException
findValueInstantiator
in class DeserializerFactory
JsonMappingException
public ValueInstantiator _valueInstantiatorInstance(DeserializationConfig config, Annotated annotated, java.lang.Object instDef) throws JsonMappingException
JsonMappingException
public JsonDeserializer<?> createArrayDeserializer(DeserializationContext ctxt, ArrayType type, BeanDescription beanDesc) throws JsonMappingException
DeserializerFactory
createArrayDeserializer
in class DeserializerFactory
type
- Type to be deserializedJsonMappingException
public JsonDeserializer<?> createCollectionDeserializer(DeserializationContext ctxt, CollectionType type, BeanDescription beanDesc) throws JsonMappingException
createCollectionDeserializer
in class DeserializerFactory
JsonMappingException
public JsonDeserializer<?> createCollectionLikeDeserializer(DeserializationContext ctxt, CollectionLikeType type, BeanDescription beanDesc) throws JsonMappingException
createCollectionLikeDeserializer
in class DeserializerFactory
JsonMappingException
public JsonDeserializer<?> createMapDeserializer(DeserializationContext ctxt, MapType type, BeanDescription beanDesc) throws JsonMappingException
createMapDeserializer
in class DeserializerFactory
JsonMappingException
public JsonDeserializer<?> createMapLikeDeserializer(DeserializationContext ctxt, MapLikeType type, BeanDescription beanDesc) throws JsonMappingException
createMapLikeDeserializer
in class DeserializerFactory
JsonMappingException
public JsonDeserializer<?> createEnumDeserializer(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc) throws JsonMappingException
Enum
types.createEnumDeserializer
in class DeserializerFactory
JsonMappingException
public JsonDeserializer<?> createTreeDeserializer(DeserializationConfig config, JavaType nodeType, BeanDescription beanDesc) throws JsonMappingException
DeserializerFactory
createTreeDeserializer
in class DeserializerFactory
JsonMappingException
public JsonDeserializer<?> createReferenceDeserializer(DeserializationContext ctxt, ReferenceType type, BeanDescription beanDesc) throws JsonMappingException
createReferenceDeserializer
in class DeserializerFactory
JsonMappingException
public TypeDeserializer findTypeDeserializer(DeserializationConfig config, JavaType baseType) throws JsonMappingException
DeserializerFactory
Note that this method is usually only directly called for values of container (Collection, array, Map) types and root values, but not for bean property values.
findTypeDeserializer
in class DeserializerFactory
baseType
- Declared base type of the value to deserializer (actual
deserializer type will be this type or its subtype)JsonMappingException
public KeyDeserializer createKeyDeserializer(DeserializationContext ctxt, JavaType type) throws JsonMappingException
DeserializerFactory
createKeyDeserializer
in class DeserializerFactory
JsonMappingException
public TypeDeserializer findPropertyTypeDeserializer(DeserializationConfig config, JavaType baseType, AnnotatedMember annotated) throws JsonMappingException
Note that this method is only called for non-container bean properties, and not for values in container types or root values (or container properties)
baseType
- Declared base type of the value to deserializer (actual
deserializer type will be this type or its subtype)JsonMappingException
public TypeDeserializer findPropertyContentTypeDeserializer(DeserializationConfig config, JavaType containerType, AnnotatedMember propertyEntity) throws JsonMappingException
Note that this method is only called for container bean properties, and not for values in container types or root values (or non-container properties)
containerType
- Type of property; must be a container typepropertyEntity
- Field or method that contains container propertyJsonMappingException
public JsonDeserializer<?> findDefaultDeserializer(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc) throws JsonMappingException
JsonMappingException
Copyright © 2010 - 2020 Adobe. All Rights Reserved