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.
| Modifier and Type | Field and Description |
|---|---|
| protected HashMap | |
| protected boolean | _hasEnumDeserializer
Flag to help find "generic" enum deserializer, if one has been registered. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private final ValueDeserializer | |
| public <T> SimpleDeserializers | |
| public SimpleDeserializers | |
| public ValueDeserializer | findArrayDeserializer(ArrayType type, DeserializationConfig config, BeanDescription.
Overrides default tools. Method called to locate deserializer for specified array type. |
| public ValueDeserializer | findBeanDeserializer(JavaType type, DeserializationConfig config, BeanDescription.
Overrides default tools. Method called to locate deserializer for specified value type which does not belong to any other category (not an Enum, Collection, Map, Array, reference value or tree node) |
| public ValueDeserializer | findCollectionDeserializer(CollectionType type, DeserializationConfig config, BeanDescription.
Overrides default tools. Method called to locate deserializer for specified |
| public ValueDeserializer | findCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription.
Overrides default tools. Method called to locate deserializer for specified
"Collection-like" type (one that acts
like |
| public ValueDeserializer | findEnumDeserializer(JavaType enumType, DeserializationConfig config, BeanDescription.
Overrides default tools. Method called to locate deserializer for specified |
| public ValueDeserializer | findMapDeserializer(MapType type, DeserializationConfig config, BeanDescription.
Overrides default tools. Method called to locate deserializer for specified |
| public ValueDeserializer | findMapLikeDeserializer(MapLikeType type, DeserializationConfig config, BeanDescription.
Overrides default tools. Method called to locate deserializer for specified
"Map-like" type (one that acts
like |
| public ValueDeserializer | findReferenceDeserializer(ReferenceType refType, DeserializationConfig config, BeanDescription.
Overrides default tools. Method called to locate deserializer for value that is of referential type, |
| public ValueDeserializer | findTreeNodeDeserializer(JavaType nodeType, DeserializationConfig config, BeanDescription.
Overrides default tools. Method called to locate deserializer for specified JSON tree node type. |
| public boolean | hasDeserializerFor(DeserializationConfig config, Class<?> valueType)
Implements abstract tools. Implements tools. Method that may be called to check whether this deserializer provider would provide deserializer for values of given type, without attempting to construct (and possibly fail in some cases) actual deserializer. |
| _classMappings | back to summary |
|---|---|
| protected HashMap<ClassKey, ValueDeserializer<?>> _classMappings | |
| _hasEnumDeserializer | back to summary |
|---|---|
| protected boolean _hasEnumDeserializer Flag to help find "generic" enum deserializer, if one has been registered. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SimpleDeserializers | back to summary |
|---|---|
| public SimpleDeserializers() | |
| SimpleDeserializers | back to summary |
|---|---|
| public SimpleDeserializers(Map<Class<?>, ValueDeserializer<?>> desers) | |
| _find | back to summary |
|---|---|
| private final ValueDeserializer | |
| addDeserializer | back to summary |
|---|---|
| public <T> SimpleDeserializers addDeserializer(Class<T> forClass, ValueDeserializer<? extends T> deser) | |
| addDeserializers | back to summary |
|---|---|
public SimpleDeserializers addDeserializers(Map<Class<?>, ValueDeserializer<?>> desers)
| |
| findArrayDeserializer | back to summary |
|---|---|
| public ValueDeserializer Overrides default tools. Doc from tools. Method called to locate deserializer for specified array 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).
| |
| findBeanDeserializer | back to summary |
|---|---|
| public ValueDeserializer Overrides default tools. Doc from tools. Method called to locate deserializer for specified value type which does not belong to any other category (not an Enum, Collection, Map, Array, reference value or tree node)
| |
| findCollectionDeserializer | back to summary |
|---|---|
| public ValueDeserializer Overrides default tools. Doc from tools. Method called to locate deserializer for specified 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).
| |
| findCollectionLikeDeserializer | back to summary |
|---|---|
| public ValueDeserializer Overrides default tools. Doc from tools. Method called to locate deserializer for specified
"Collection-like" type (one that acts
like 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).
| |
| findEnumDeserializer | back to summary |
|---|---|
| public ValueDeserializer Overrides default tools. Doc from tools. Method called to locate deserializer for specified
| |
| findMapDeserializer | back to summary |
|---|---|
| public ValueDeserializer Overrides default tools. Doc from tools. Method called to locate deserializer for specified 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
| |
| findMapLikeDeserializer | back to summary |
|---|---|
| public ValueDeserializer Overrides default tools. Doc from tools. Method called to locate deserializer for specified
"Map-like" type (one that acts
like 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
| |
| findReferenceDeserializer | back to summary |
|---|---|
| public ValueDeserializer Overrides default tools. Doc from tools. Method called to locate deserializer for value that is of referential type,
| |
| findTreeNodeDeserializer | back to summary |
|---|---|
| public ValueDeserializer Overrides default tools. Doc from tools. Method called to locate deserializer for specified JSON tree node type.
| |
| hasDeserializerFor | back to summary |
|---|---|
| public boolean hasDeserializerFor(DeserializationConfig config, Class<?> valueType) Implements abstract tools. Implements tools. Doc from tools. Method that may be called to check whether this deserializer provider would provide deserializer for values of given type, without attempting to construct (and possibly fail in some cases) actual deserializer. Mostly needed to support validation of polymorphic type ids. Note implementations should take care NOT to claim supporting types that they do not recognize as this could to incorrect assumption of safe support by caller.
| |