|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.databind.deser.DeserializerFactory com.fasterxml.jackson.databind.deser.BasicDeserializerFactory com.fasterxml.jackson.databind.deser.BeanDeserializerFactory
public class BeanDeserializerFactory
Concrete deserializer factory class that adds full Bean deserializer construction logic using class introspection. Note that factories specifically do not implement any form of caching: aside from configuration they are stateless; caching is implemented by other components.
Instances of this class are fully immutable as all configuration is done by using "fluent factories" (methods that construct new factory instances with different configuration, instead of modifying instance).
Field Summary | |
---|---|
static BeanDeserializerFactory |
instance
Globally shareable thread-safe instance which has no additional custom deserializers registered |
Fields inherited from class com.fasterxml.jackson.databind.deser.BasicDeserializerFactory |
---|
_arrayDeserializers, _factoryConfig, _keyDeserializers, _simpleDeserializers, optionalHandlers |
Fields inherited from class com.fasterxml.jackson.databind.deser.DeserializerFactory |
---|
NO_DESERIALIZERS |
Constructor Summary | |
---|---|
BeanDeserializerFactory(DeserializerFactoryConfig config)
|
Method Summary | |
---|---|
protected JsonDeserializer<Object> |
_findCustomBeanDeserializer(JavaType type,
DeserializationConfig config,
BeanDescription beanDesc)
|
protected void |
addBeanProps(DeserializationContext ctxt,
BeanDescription beanDesc,
BeanDeserializerBuilder builder)
Method called to figure out settable properties for the bean deserializer to use. |
protected void |
addInjectables(DeserializationContext ctxt,
BeanDescription beanDesc,
BeanDeserializerBuilder builder)
Method called locate all members used for value injection (if any), constructor ValueInjector instances, and add them to builder. |
protected void |
addObjectIdReader(DeserializationContext ctxt,
BeanDescription beanDesc,
BeanDeserializerBuilder builder)
|
protected void |
addReferenceProperties(DeserializationContext ctxt,
BeanDescription beanDesc,
BeanDeserializerBuilder builder)
Method that will find if bean has any managed- or back-reference properties, and if so add them to bean, to be linked during resolution phase. |
JsonDeserializer<Object> |
buildBeanDeserializer(DeserializationContext ctxt,
JavaType type,
BeanDescription beanDesc)
Method that is to actually build a bean deserializer instance. |
protected JsonDeserializer<Object> |
buildBuilderBasedDeserializer(DeserializationContext ctxt,
JavaType valueType,
BeanDescription builderDesc)
Method for constructing a bean deserializer that uses specified intermediate Builder for binding data, and construction of the value instance. |
JsonDeserializer<Object> |
buildThrowableDeserializer(DeserializationContext ctxt,
JavaType type,
BeanDescription beanDesc)
|
protected SettableAnyProperty |
constructAnySetter(DeserializationContext ctxt,
BeanDescription beanDesc,
AnnotatedMethod setter)
Method called to construct fallback SettableAnyProperty
for handling unknown bean properties, given a method that
has been designated as such setter. |
protected BeanDeserializerBuilder |
constructBeanDeserializerBuilder(DeserializationContext ctxt,
BeanDescription beanDesc)
Overridable method that constructs a BeanDeserializerBuilder
which is used to accumulate information needed to create deserializer
instance. |
protected SettableBeanProperty |
constructSettableProperty(DeserializationContext ctxt,
BeanDescription beanDesc,
BeanPropertyDefinition propDef,
Type jdkType)
Method that will construct a regular bean property setter using the given setter method. |
protected SettableBeanProperty |
constructSetterlessProperty(DeserializationContext ctxt,
BeanDescription beanDesc,
BeanPropertyDefinition propDef)
Method that will construct a regular bean property setter using the given setter method. |
JsonDeserializer<Object> |
createBeanDeserializer(DeserializationContext ctxt,
JavaType type,
BeanDescription beanDesc)
Method that DeserializerCache s call to create a new
deserializer for types other than Collections, Maps, arrays and
enums. |
JsonDeserializer<Object> |
createBuilderBasedDeserializer(DeserializationContext ctxt,
JavaType valueType,
BeanDescription beanDesc,
Class<?> builderClass)
Method called to create a deserializer that will use specified Builder class for building value instances. |
protected List<BeanPropertyDefinition> |
filterBeanProps(DeserializationContext ctxt,
BeanDescription beanDesc,
BeanDeserializerBuilder builder,
List<BeanPropertyDefinition> propDefsIn,
Set<String> ignored)
Helper method called to filter out explicit ignored properties, as well as properties that have "ignorable types". |
protected JsonDeserializer<Object> |
findStdDeserializer(DeserializationConfig config,
JavaType type)
Method called by BeanDeserializerFactory to see if there might be a standard
deserializer registered for given type. |
protected boolean |
isIgnorableType(DeserializationConfig config,
BeanDescription beanDesc,
Class<?> type,
Map<Class<?>,Boolean> ignoredTypes)
Helper method that will check whether given raw type is marked as always ignorable (for purpose of ignoring properties with type) |
protected boolean |
isPotentialBeanType(Class<?> type)
Helper method used to skip processing for types that we know can not be (i.e. |
protected JavaType |
materializeAbstractType(DeserializationConfig config,
BeanDescription beanDesc)
|
DeserializerFactory |
withConfig(DeserializerFactoryConfig config)
Method used by module registration functionality, to construct a new bean deserializer factory with different configuration settings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final BeanDeserializerFactory instance
Constructor Detail |
---|
public BeanDeserializerFactory(DeserializerFactoryConfig config)
Method Detail |
---|
public DeserializerFactory withConfig(DeserializerFactoryConfig config)
withConfig
in class BasicDeserializerFactory
protected JsonDeserializer<Object> _findCustomBeanDeserializer(JavaType type, DeserializationConfig config, BeanDescription beanDesc) throws JsonMappingException
JsonMappingException
public JsonDeserializer<Object> createBeanDeserializer(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc) throws JsonMappingException
DeserializerCache
s call to create a new
deserializer for types other than Collections, Maps, arrays and
enums.
createBeanDeserializer
in class DeserializerFactory
type
- Type to be deserialized
JsonMappingException
public JsonDeserializer<Object> createBuilderBasedDeserializer(DeserializationContext ctxt, JavaType valueType, BeanDescription beanDesc, Class<?> builderClass) throws JsonMappingException
DeserializerFactory
createBuilderBasedDeserializer
in class DeserializerFactory
JsonMappingException
protected JsonDeserializer<Object> findStdDeserializer(DeserializationConfig config, JavaType type) throws JsonMappingException
BeanDeserializerFactory
to see if there might be a standard
deserializer registered for given type.
JsonMappingException
protected JavaType materializeAbstractType(DeserializationConfig config, BeanDescription beanDesc) throws JsonMappingException
JsonMappingException
public JsonDeserializer<Object> buildBeanDeserializer(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc) throws JsonMappingException
JsonMappingException
protected JsonDeserializer<Object> buildBuilderBasedDeserializer(DeserializationContext ctxt, JavaType valueType, BeanDescription builderDesc) throws JsonMappingException
JsonMappingException
protected void addObjectIdReader(DeserializationContext ctxt, BeanDescription beanDesc, BeanDeserializerBuilder builder) throws JsonMappingException
JsonMappingException
public JsonDeserializer<Object> buildThrowableDeserializer(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc) throws JsonMappingException
JsonMappingException
protected BeanDeserializerBuilder constructBeanDeserializerBuilder(DeserializationContext ctxt, BeanDescription beanDesc)
BeanDeserializerBuilder
which is used to accumulate information needed to create deserializer
instance.
protected void addBeanProps(DeserializationContext ctxt, BeanDescription beanDesc, BeanDeserializerBuilder builder) throws JsonMappingException
Note: designed to be overridable, and effort is made to keep interface similar between versions.
JsonMappingException
protected List<BeanPropertyDefinition> filterBeanProps(DeserializationContext ctxt, BeanDescription beanDesc, BeanDeserializerBuilder builder, List<BeanPropertyDefinition> propDefsIn, Set<String> ignored) throws JsonMappingException
JsonMappingException
protected void addReferenceProperties(DeserializationContext ctxt, BeanDescription beanDesc, BeanDeserializerBuilder builder) throws JsonMappingException
JsonMappingException
protected void addInjectables(DeserializationContext ctxt, BeanDescription beanDesc, BeanDeserializerBuilder builder) throws JsonMappingException
ValueInjector
instances, and add them to builder.
JsonMappingException
protected SettableAnyProperty constructAnySetter(DeserializationContext ctxt, BeanDescription beanDesc, AnnotatedMethod setter) throws JsonMappingException
SettableAnyProperty
for handling unknown bean properties, given a method that
has been designated as such setter.
JsonMappingException
protected SettableBeanProperty constructSettableProperty(DeserializationContext ctxt, BeanDescription beanDesc, BeanPropertyDefinition propDef, Type jdkType) throws JsonMappingException
JsonMappingException
protected SettableBeanProperty constructSetterlessProperty(DeserializationContext ctxt, BeanDescription beanDesc, BeanPropertyDefinition propDef) throws JsonMappingException
JsonMappingException
protected boolean isPotentialBeanType(Class<?> type)
Note that usually we shouldn't really be getting these sort of types anyway; but better safe than sorry.
protected boolean isIgnorableType(DeserializationConfig config, BeanDescription beanDesc, Class<?> type, Map<Class<?>,Boolean> ignoredTypes)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |