public abstract class BasicDeserializerFactory extends DeserializerFactory implements 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 | Field and Description |
|---|---|
protected DeserializerFactoryConfig |
_factoryConfig
Configuration settings for this factory; immutable instance (just like this
factory), new version created via copy-constructor (fluent-style)
|
protected static PropertyName |
UNWRAPPED_CREATOR_PARAM_NAME
We need a placeholder for creator properties that don't have name
but are marked with `@JsonWrapped` annotation.
|
NO_DESERIALIZERS| Modifier | Constructor and Description |
|---|---|
protected |
BasicDeserializerFactory(DeserializerFactoryConfig config) |
createBeanDeserializer, createBuilderBasedDeserializerprotected static final PropertyName UNWRAPPED_CREATOR_PARAM_NAME
protected final DeserializerFactoryConfig _factoryConfig
protected BasicDeserializerFactory(DeserializerFactoryConfig config)
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.
protected abstract DeserializerFactory withConfig(DeserializerFactoryConfig config)
public final DeserializerFactory withAdditionalDeserializers(Deserializers additional)
withAdditionalDeserializers in class DeserializerFactorypublic final DeserializerFactory withAdditionalKeyDeserializers(KeyDeserializers additional)
KeyDeserializers.withAdditionalKeyDeserializers in class DeserializerFactorypublic final DeserializerFactory withDeserializerModifier(BeanDeserializerModifier modifier)
BeanDeserializerModifier.withDeserializerModifier in class DeserializerFactorypublic final DeserializerFactory withAbstractTypeResolver(AbstractTypeResolver resolver)
AbstractTypeResolver.withAbstractTypeResolver in class DeserializerFactorypublic final DeserializerFactory withValueInstantiators(ValueInstantiators instantiators)
ValueInstantiators.withValueInstantiators in class DeserializerFactorypublic JavaType mapAbstractType(DeserializationConfig config, JavaType type) throws JsonMappingException
DeserializerFactorymapAbstractType in class DeserializerFactoryJsonMappingExceptionpublic ValueInstantiator findValueInstantiator(DeserializationContext ctxt, BeanDescription beanDesc) throws JsonMappingException
findValueInstantiator in class DeserializerFactoryJsonMappingExceptionprotected ValueInstantiator _constructDefaultValueInstantiator(DeserializationContext ctxt, BeanDescription beanDesc) throws JsonMappingException
ValueInstantiator
using annotations (like @JsonCreator) and visibility rulesJsonMappingExceptionprotected Map<AnnotatedWithParams,BeanPropertyDefinition[]> _findCreatorsFromProperties(DeserializationContext ctxt, BeanDescription beanDesc) throws JsonMappingException
JsonMappingExceptionpublic ValueInstantiator _valueInstantiatorInstance(DeserializationConfig config, Annotated annotated, Object instDef) throws JsonMappingException
JsonMappingExceptionprotected void _addDeserializerConstructors(DeserializationContext ctxt, BeanDescription beanDesc, VisibilityChecker<?> vchecker, AnnotationIntrospector intr, CreatorCollector creators, Map<AnnotatedWithParams,BeanPropertyDefinition[]> creatorParams) throws JsonMappingException
JsonMappingExceptionprotected void _checkImplicitlyNamedConstructors(DeserializationContext ctxt, BeanDescription beanDesc, VisibilityChecker<?> vchecker, AnnotationIntrospector intr, CreatorCollector creators, List<AnnotatedConstructor> implicitCtors) throws JsonMappingException
JsonMappingExceptionprotected boolean _checkIfCreatorPropertyBased(AnnotationIntrospector intr, AnnotatedWithParams creator, BeanPropertyDefinition propDef)
protected boolean _handleSingleArgumentConstructor(DeserializationContext ctxt, BeanDescription beanDesc, VisibilityChecker<?> vchecker, AnnotationIntrospector intr, CreatorCollector creators, AnnotatedConstructor ctor, boolean isCreator, boolean isVisible) throws JsonMappingException
JsonMappingExceptionprotected void _addDeserializerFactoryMethods(DeserializationContext ctxt, BeanDescription beanDesc, VisibilityChecker<?> vchecker, AnnotationIntrospector intr, CreatorCollector creators, Map<AnnotatedWithParams,BeanPropertyDefinition[]> creatorParams) throws JsonMappingException
JsonMappingExceptionprotected boolean _handleSingleArgumentFactory(DeserializationConfig config, BeanDescription beanDesc, VisibilityChecker<?> vchecker, AnnotationIntrospector intr, CreatorCollector creators, AnnotatedMethod factory, boolean isCreator) throws JsonMappingException
JsonMappingExceptionprotected CreatorProperty constructCreatorProperty(DeserializationContext ctxt, BeanDescription beanDesc, PropertyName name, int index, AnnotatedParameter param, Object injectableValueId) throws JsonMappingException
JsonMappingExceptionprotected PropertyName _findParamName(AnnotatedParameter param, AnnotationIntrospector intr)
protected PropertyName _findImplicitParamName(AnnotatedParameter param, AnnotationIntrospector intr)
@Deprecated protected PropertyName _findExplicitParamName(AnnotatedParameter param, AnnotationIntrospector intr)
@Deprecated protected boolean _hasExplicitParamName(AnnotatedParameter param, AnnotationIntrospector intr)
public JsonDeserializer<?> createArrayDeserializer(DeserializationContext ctxt, ArrayType type, BeanDescription beanDesc) throws JsonMappingException
DeserializerFactorycreateArrayDeserializer in class DeserializerFactorytype - Type to be deserializedJsonMappingExceptionpublic JsonDeserializer<?> createCollectionDeserializer(DeserializationContext ctxt, CollectionType type, BeanDescription beanDesc) throws JsonMappingException
createCollectionDeserializer in class DeserializerFactoryJsonMappingExceptionprotected CollectionType _mapAbstractCollectionType(JavaType type, DeserializationConfig config)
public JsonDeserializer<?> createCollectionLikeDeserializer(DeserializationContext ctxt, CollectionLikeType type, BeanDescription beanDesc) throws JsonMappingException
createCollectionLikeDeserializer in class DeserializerFactoryJsonMappingExceptionpublic JsonDeserializer<?> createMapDeserializer(DeserializationContext ctxt, MapType type, BeanDescription beanDesc) throws JsonMappingException
createMapDeserializer in class DeserializerFactoryJsonMappingExceptionpublic JsonDeserializer<?> createMapLikeDeserializer(DeserializationContext ctxt, MapLikeType type, BeanDescription beanDesc) throws JsonMappingException
createMapLikeDeserializer in class DeserializerFactoryJsonMappingExceptionpublic JsonDeserializer<?> createEnumDeserializer(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc) throws JsonMappingException
Enum types.createEnumDeserializer in class DeserializerFactoryJsonMappingExceptionpublic JsonDeserializer<?> createTreeDeserializer(DeserializationConfig config, JavaType nodeType, BeanDescription beanDesc) throws JsonMappingException
DeserializerFactorycreateTreeDeserializer in class DeserializerFactoryJsonMappingExceptionpublic TypeDeserializer findTypeDeserializer(DeserializationConfig config, JavaType baseType) throws JsonMappingException
DeserializerFactoryNote 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 DeserializerFactorybaseType - Declared base type of the value to deserializer (actual
deserializer type will be this type or its subtype)JsonMappingExceptionprotected JsonDeserializer<?> findOptionalStdDeserializer(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc) throws JsonMappingException
JsonMappingExceptionpublic KeyDeserializer createKeyDeserializer(DeserializationContext ctxt, JavaType type) throws JsonMappingException
DeserializerFactorycreateKeyDeserializer in class DeserializerFactoryJsonMappingExceptionpublic 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)JsonMappingExceptionpublic 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 propertyJsonMappingExceptionpublic JsonDeserializer<?> findDefaultDeserializer(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc) throws JsonMappingException
JsonMappingExceptionprotected JavaType _findRemappedType(DeserializationConfig config, Class<?> rawType) throws JsonMappingException
JsonMappingExceptionprotected JsonDeserializer<?> _findCustomArrayDeserializer(ArrayType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException
JsonMappingExceptionprotected JsonDeserializer<Object> _findCustomBeanDeserializer(JavaType type, DeserializationConfig config, BeanDescription beanDesc) throws JsonMappingException
JsonMappingExceptionprotected JsonDeserializer<?> _findCustomCollectionDeserializer(CollectionType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException
JsonMappingExceptionprotected JsonDeserializer<?> _findCustomCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException
JsonMappingExceptionprotected JsonDeserializer<?> _findCustomEnumDeserializer(Class<?> type, DeserializationConfig config, BeanDescription beanDesc) throws JsonMappingException
JsonMappingExceptionprotected JsonDeserializer<?> _findCustomMapDeserializer(MapType type, DeserializationConfig config, BeanDescription beanDesc, KeyDeserializer keyDeserializer, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException
JsonMappingExceptionprotected JsonDeserializer<?> _findCustomMapLikeDeserializer(MapLikeType type, DeserializationConfig config, BeanDescription beanDesc, KeyDeserializer keyDeserializer, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException
JsonMappingExceptionprotected JsonDeserializer<?> _findCustomTreeNodeDeserializer(Class<? extends JsonNode> type, DeserializationConfig config, BeanDescription beanDesc) throws JsonMappingException
JsonMappingExceptionprotected JsonDeserializer<Object> findDeserializerFromAnnotation(DeserializationContext ctxt, Annotated ann) throws JsonMappingException
JsonMappingExceptionprotected <T extends JavaType> T modifyTypeByAnnotation(DeserializationContext ctxt, Annotated a, T type) throws JsonMappingException
a - Method or field that the type is associated withtype - Type of field, or the setter argumentJsonMappingException - if invalid annotation is foundprotected JavaType resolveType(DeserializationContext ctxt, BeanDescription beanDesc, JavaType type, AnnotatedMember member) throws JsonMappingException
JsonMappingExceptionprotected EnumResolver constructEnumResolver(Class<?> enumClass, DeserializationConfig config, AnnotatedMethod jsonValueMethod)
protected AnnotatedMethod _findJsonValueFor(DeserializationConfig config, JavaType enumType)
Copyright © 2014–2015 FasterXML. All rights reserved.