|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.map.DeserializerFactory
org.codehaus.jackson.map.deser.BasicDeserializerFactory
org.codehaus.jackson.map.deser.BeanDeserializerFactory
public class BeanDeserializerFactory
Concrete deserializer factory class that adds full Bean deserializer construction logic using class introspection.
Since there is no caching, this factory is stateless and a globally
shared singleton instance (instance
) can be used by
DeserializerProvider
s).
Field Summary | |
---|---|
static BeanDeserializerFactory |
instance
|
Constructor Summary | |
---|---|
protected |
BeanDeserializerFactory()
We will provide default constructor to allow sub-classing, but make it protected so that no non-singleton instances of the class will be instantiated. |
Method Summary | |
---|---|
protected void |
_addDeserializerConstructors(DeserializationConfig config,
BasicBeanDescription beanDesc,
VisibilityChecker<?> vchecker,
BeanDeserializer deser,
AnnotationIntrospector intr,
CreatorContainer creators)
|
protected void |
_addDeserializerFactoryMethods(DeserializationConfig config,
BasicBeanDescription beanDesc,
VisibilityChecker<?> vchecker,
BeanDeserializer deser,
AnnotationIntrospector intr,
CreatorContainer creators)
|
protected void |
addBeanProps(DeserializationConfig config,
BasicBeanDescription beanDesc,
BeanDeserializer deser)
Method called to figure out settable properties for the bean deserializer to use. |
protected void |
addDeserializerCreators(DeserializationConfig config,
BasicBeanDescription beanDesc,
BeanDeserializer deser)
Method that is to find all creators (constructors, factory methods) for the bean type to deserialize. |
JsonDeserializer<Object> |
buildBeanDeserializer(DeserializationConfig config,
JavaType type,
BasicBeanDescription beanDesc)
Method that is to actually build a bean deserializer instance. |
JsonDeserializer<Object> |
buildThrowableDeserializer(DeserializationConfig config,
JavaType type,
BasicBeanDescription beanDesc)
|
protected SettableAnyProperty |
constructAnySetter(DeserializationConfig config,
AnnotatedMethod am)
Method called to construct fallback SettableAnyProperty
for handling unknown bean properties, given a method that
has been designated as such setter. |
protected BeanDeserializer |
constructBeanDeserializerInstance(DeserializationConfig config,
JavaType type,
BasicBeanDescription beanDesc)
Method for construcing "empty" deserializer: overridable to allow sub-classing of BeanDeserializer . |
protected SettableBeanProperty |
constructSettableProperty(DeserializationConfig config,
BasicBeanDescription beanDesc,
String name,
AnnotatedField field)
|
protected SettableBeanProperty |
constructSettableProperty(DeserializationConfig config,
BasicBeanDescription beanDesc,
String name,
AnnotatedMethod setter)
Method that will construct a regular bean property setter using the given setter method. |
protected SettableBeanProperty |
constructSetterlessProperty(DeserializationConfig config,
BasicBeanDescription beanDesc,
String name,
AnnotatedMethod getter)
Method that will construct a regular bean property setter using the given setter method. |
protected ThrowableDeserializer |
constructThrowableDeserializerInstance(DeserializationConfig config,
JavaType type,
BasicBeanDescription beanDesc)
|
JsonDeserializer<Object> |
createBeanDeserializer(DeserializationConfig config,
JavaType type,
DeserializerProvider p)
Method that DeserializerProvider s call to create a new
deserializer for types other than Collections, Maps, arrays and
enums. |
protected boolean |
isPotentialBeanType(Class<?> type)
Helper method used to skip processing for types that we know can not be (i.e. |
Methods inherited from class org.codehaus.jackson.map.deser.BasicDeserializerFactory |
---|
constructCreatorProperty, createArrayDeserializer, createCollectionDeserializer, createEnumDeserializer, createMapDeserializer, createTreeDeserializer, findDeserializerFromAnnotation, findPropertyContentTypeDeserializer, findPropertyTypeDeserializer, findTypeDeserializer, modifyTypeByAnnotation, resolveType |
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 |
---|
protected BeanDeserializerFactory()
Method Detail |
---|
public JsonDeserializer<Object> createBeanDeserializer(DeserializationConfig config, JavaType type, DeserializerProvider p) throws JsonMappingException
DeserializerProvider
s call to create a new
deserializer for types other than Collections, Maps, arrays and
enums.
createBeanDeserializer
in class BasicDeserializerFactory
type
- Type to be deserializedp
- Provider that can be called to create deserializers for
contained member types
JsonMappingException
public JsonDeserializer<Object> buildBeanDeserializer(DeserializationConfig config, JavaType type, BasicBeanDescription beanDesc) throws JsonMappingException
JsonMappingException
public JsonDeserializer<Object> buildThrowableDeserializer(DeserializationConfig config, JavaType type, BasicBeanDescription beanDesc) throws JsonMappingException
JsonMappingException
protected BeanDeserializer constructBeanDeserializerInstance(DeserializationConfig config, JavaType type, BasicBeanDescription beanDesc)
BeanDeserializer
.
protected ThrowableDeserializer constructThrowableDeserializerInstance(DeserializationConfig config, JavaType type, BasicBeanDescription beanDesc)
protected void addDeserializerCreators(DeserializationConfig config, BasicBeanDescription beanDesc, BeanDeserializer deser) throws JsonMappingException
JsonMappingException
protected void _addDeserializerConstructors(DeserializationConfig config, BasicBeanDescription beanDesc, VisibilityChecker<?> vchecker, BeanDeserializer deser, AnnotationIntrospector intr, CreatorContainer creators) throws JsonMappingException
JsonMappingException
protected void _addDeserializerFactoryMethods(DeserializationConfig config, BasicBeanDescription beanDesc, VisibilityChecker<?> vchecker, BeanDeserializer deser, AnnotationIntrospector intr, CreatorContainer creators) throws JsonMappingException
JsonMappingException
protected void addBeanProps(DeserializationConfig config, BasicBeanDescription beanDesc, BeanDeserializer deser) throws JsonMappingException
JsonMappingException
protected SettableAnyProperty constructAnySetter(DeserializationConfig config, AnnotatedMethod am) throws JsonMappingException
SettableAnyProperty
for handling unknown bean properties, given a method that
has been designated as such setter.
JsonMappingException
protected SettableBeanProperty constructSettableProperty(DeserializationConfig config, BasicBeanDescription beanDesc, String name, AnnotatedMethod setter) throws JsonMappingException
setter
- Method to use to set property value; or null if none.
Null only for "setterless" properties
JsonMappingException
protected SettableBeanProperty constructSettableProperty(DeserializationConfig config, BasicBeanDescription beanDesc, String name, AnnotatedField field) throws JsonMappingException
JsonMappingException
protected SettableBeanProperty constructSetterlessProperty(DeserializationConfig config, BasicBeanDescription beanDesc, String name, AnnotatedMethod getter) throws JsonMappingException
getter
- Method to use to get property value to modify, null if
none. Non-null for "setterless" properties.
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |