|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.jackson.map.module.SimpleDeserializers
public class SimpleDeserializers
Simple implementation Deserializers which allows registration of
deserializers based on raw (type erased class).
It can work well for basic bean and scalar type deserializers, but is not
a good fit for handling generic types (like Maps and Collections
or array types).
Unlike SimpleSerializers, this class does not currently support generic mappings;
all mappings must be to exact declared deserialization type.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.codehaus.jackson.map.Deserializers |
|---|
Deserializers.None |
| Field Summary | |
|---|---|
protected HashMap<ClassKey,JsonDeserializer<?>> |
_classMappings
|
| Constructor Summary | |
|---|---|
SimpleDeserializers()
|
|
| Method Summary | ||
|---|---|---|
|
addDeserializer(Class<T> forClass,
JsonDeserializer<? extends T> deser)
|
|
JsonDeserializer<?> |
findArrayDeserializer(ArrayType type,
DeserializationConfig config,
DeserializerProvider provider,
BeanProperty property,
TypeDeserializer elementTypeDeserializer,
JsonDeserializer<?> elementDeserializer)
Method called to locate constructor for specified array type. |
|
JsonDeserializer<?> |
findBeanDeserializer(JavaType type,
DeserializationConfig config,
DeserializerProvider provider,
BeanDescription beanDesc,
BeanProperty property)
Method called to locate deserializer for specified value type which does not belong to any other category (not an Enum, Collection, Map, Array or tree node) |
|
JsonDeserializer<?> |
findCollectionDeserializer(CollectionType type,
DeserializationConfig config,
DeserializerProvider provider,
BeanDescription beanDesc,
BeanProperty property,
TypeDeserializer elementTypeDeserializer,
JsonDeserializer<?> elementDeserializer)
Method called to locate constructor for specified Collection (List, Set etc) type. |
|
JsonDeserializer<?> |
findEnumDeserializer(Class<?> type,
DeserializationConfig config,
BeanDescription beanDesc,
BeanProperty property)
Method called to locate deserializer for specified Enum type. |
|
JsonDeserializer<?> |
findMapDeserializer(MapType type,
DeserializationConfig config,
DeserializerProvider provider,
BeanDescription beanDesc,
BeanProperty property,
KeyDeserializer keyDeserializer,
TypeDeserializer elementTypeDeserializer,
JsonDeserializer<?> elementDeserializer)
Method called to locate deserializer for specified Map type. |
|
JsonDeserializer<?> |
findTreeNodeDeserializer(Class<? extends JsonNode> nodeType,
DeserializationConfig config,
BeanProperty property)
Method called to locate deserializer for specified JSON tree node type. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HashMap<ClassKey,JsonDeserializer<?>> _classMappings
| Constructor Detail |
|---|
public SimpleDeserializers()
| Method Detail |
|---|
public <T> void addDeserializer(Class<T> forClass,
JsonDeserializer<? extends T> deser)
public JsonDeserializer<?> findArrayDeserializer(ArrayType type,
DeserializationConfig config,
DeserializerProvider provider,
BeanProperty property,
TypeDeserializer elementTypeDeserializer,
JsonDeserializer<?> elementDeserializer)
DeserializersDeserializer for element type may be passed, if configured explicitly at higher level (by annotations, typically), but usually are not. Type deserializer for element is passed if one is needed based on contextual information (annotations on declared element class; or on field or method type is associated with).
findArrayDeserializer in interface Deserializerstype - Type of array instances to deserializeconfig - Configuration in effectprovider - Provider that can be used to locate deserializer for component type (if
one not provided, or needs to be overridden)property - Property that contains array value (null for root values)elementTypeDeserializer - If element type needs polymorphic type handling, this is
the type information deserializer to use; should usually be used as is when constructing
array deserializer.elementDeserializer - Deserializer to use for elements, if explicitly defined (by using
annotations, for exmple). May be null, in which case it should be resolved here (or using
ResolvableDeserializer callback)
public JsonDeserializer<?> findBeanDeserializer(JavaType type,
DeserializationConfig config,
DeserializerProvider provider,
BeanDescription beanDesc,
BeanProperty property)
Deserializers
findBeanDeserializer in interface Deserializerstype - Bean type to deserializeconfig - Configuration in effectprovider - Provider that can be used to locate dependant deserializers if and as necessary
(but note that in many cases resolution must be deferred by using ResolvableDeserializer callback)beanDesc - Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers (note: always instance
of BasicBeanDescription)
public JsonDeserializer<?> findCollectionDeserializer(CollectionType type,
DeserializationConfig config,
DeserializerProvider provider,
BeanDescription beanDesc,
BeanProperty property,
TypeDeserializer elementTypeDeserializer,
JsonDeserializer<?> elementDeserializer)
DeserializersCollection (List, Set etc) type.
Deserializer for element type may be passed, if configured explicitly at higher level (by annotations, typically), but usually are not. Type deserializer for element is passed if one is needed based on contextual information (annotations on declared element class; or on field or method type is associated with).
findCollectionDeserializer in interface Deserializerstype - Type of collection instances to deserializeconfig - Configuration in effectprovider - Provider that can be used to locate dependant deserializers if and as necessary
(but note that in many cases resolution must be deferred by using ResolvableDeserializer callback)beanDesc - Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers (note: always instance
of BasicBeanDescription)property - Property that contains array value (null for root values)elementTypeDeserializer - If element type needs polymorphic type handling, this is
the type information deserializer to use; should usually be used as is when constructing
array deserializer.elementDeserializer - Deserializer to use for elements, if explicitly defined (by using
annotations, for exmple). May be null, in which case it should be resolved here (or using
ResolvableDeserializer callback)
public JsonDeserializer<?> findEnumDeserializer(Class<?> type,
DeserializationConfig config,
BeanDescription beanDesc,
BeanProperty property)
DeserializersEnum type.
findEnumDeserializer in interface Deserializerstype - Type of Enum instances to deserializeconfig - Configuration in effectbeanDesc - Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers (note: always instance
of BasicBeanDescription)
public JsonDeserializer<?> findMapDeserializer(MapType type,
DeserializationConfig config,
DeserializerProvider provider,
BeanDescription beanDesc,
BeanProperty property,
KeyDeserializer keyDeserializer,
TypeDeserializer elementTypeDeserializer,
JsonDeserializer<?> elementDeserializer)
DeserializersMap type.
Deserializer for element type may be passed, if configured explicitly at higher level (by annotations, typically), but usually are not. Type deserializer for element is passed if one is needed based on contextual information (annotations on declared element class; or on field or method type is associated with).
Similarly, a KeyDeserializer may be passed, but this is only done if there is
a specific configuration override (annotations) to indicate instance to use. Otherwise
null is passed, and key deserializer needs to be obtained using DeserializerProvider
findMapDeserializer in interface Deserializerstype - Type of Map instances to deserializeconfig - Configuration in effectprovider - Provider that can be used to locate dependant deserializers if and as necessary
(but note that in many cases resolution must be deferred by using ResolvableDeserializer callback)beanDesc - Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers (note: always instance
of BasicBeanDescription)keyDeserializer - Key deserializer use, if it is defined via annotations or other configuration;
null if default key deserializer for key type can be used.elementTypeDeserializer - If element type needs polymorphic type handling, this is
the type information deserializer to use; should usually be used as is when constructing
array deserializer.elementDeserializer - Deserializer to use for elements, if explicitly defined (by using
annotations, for exmple). May be null, in which case it should be resolved here (or using
ResolvableDeserializer callback)
public JsonDeserializer<?> findTreeNodeDeserializer(Class<? extends JsonNode> nodeType,
DeserializationConfig config,
BeanProperty property)
Deserializers
findTreeNodeDeserializer in interface DeserializersnodeType - Specific type of JSON tree nodes to deserialize (subtype of JsonNode)config - Configuration in effect
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||