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 JsonDeserializer | |
| public <T> void | |
| public void | |
| public JsonDeserializer | findArrayDeserializer(ArrayType
Type of array instances to deserialize type, DeserializationConfig Configuration in effect config, BeanDescription Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers beanDesc, TypeDeserializer 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. elementTypeDeserializer, JsonDeserializer<?> 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
elementDeserializer)ResolvableDeserializer callback)Overrides com. Implements com. Method called to locate serializer for specified array type. |
| public JsonDeserializer | findBeanDeserializer(JavaType
Bean type to deserialize type, DeserializationConfig Configuration in effect config, BeanDescription Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers beanDesc)Overrides com. Implements com. 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 JsonDeserializer | findCollectionDeserializer(CollectionType
Type of collection instances to deserialize type, DeserializationConfig Configuration in effect config, BeanDescription Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers beanDesc, TypeDeserializer 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. elementTypeDeserializer, JsonDeserializer<?> 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
elementDeserializer)ResolvableDeserializer callback)Overrides com. Implements com. Method called to locate serializer for specified |
| public JsonDeserializer | findCollectionLikeDeserializer(CollectionLikeType
Type of instances to deserialize type, DeserializationConfig Configuration in effect config, BeanDescription Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers beanDesc, TypeDeserializer 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. elementTypeDeserializer, JsonDeserializer<?> 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
elementDeserializer)ResolvableDeserializer callback)Overrides com. Implements com. Method called to locate serializer for specified
"Collection-like" type (one that acts
like |
| public JsonDeserializer | findEnumDeserializer(Class<?>
Type of type, DeserializationConfig java. instances to deserializeConfiguration in effect config, BeanDescription Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers beanDesc)Overrides com. Implements com. Method called to locate deserializer for specified |
| public JsonDeserializer | findMapDeserializer(MapType
Type of type, DeserializationConfig java. instances to deserializeConfiguration in effect config, BeanDescription Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers beanDesc, KeyDeserializer Key deserializer use, if it is defined via annotations or other configuration;
null if default key deserializer for key type can be used. keyDeserializer, TypeDeserializer 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. elementTypeDeserializer, JsonDeserializer<?> 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
elementDeserializer)ResolvableDeserializer callback)Overrides com. Implements com. Method called to locate deserializer for specified |
| public JsonDeserializer | findMapLikeDeserializer(MapLikeType
Type of type, DeserializationConfig java. instances to deserializeConfiguration in effect config, BeanDescription Definition of the enumeration type that contains class annotations and
other information typically needed for building deserializers beanDesc, KeyDeserializer Key deserializer use, if it is defined via annotations or other configuration;
null if default key deserializer for key type can be used. keyDeserializer, TypeDeserializer 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. elementTypeDeserializer, JsonDeserializer<?> 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
elementDeserializer)ResolvableDeserializer callback)Overrides com. Implements com. Method called to locate serializer for specified
"Map-like" type (one that acts
like |
| public JsonDeserializer | findReferenceDeserializer(ReferenceType
Specific referential type to deserialize refType, DeserializationConfig Configuration in effect config, BeanDescription Definition of the reference type that contains class annotations and
other information typically needed for building deserializers beanDesc, TypeDeserializer Possible type deserializer for referenced value contentTypeDeserializer, JsonDeserializer<?> Value deserializer to use for referenced value, if indicated
by property annotation contentDeserializer)Overrides com. Implements com. Method called to locate deserializer for value that is of referential type, |
| public JsonDeserializer | findTreeNodeDeserializer(Class<? extends JsonNode>
Specific type of JSON tree nodes to deserialize
(subtype of nodeType, DeserializationConfig com.)Configuration in effect config, BeanDescription beanDesc)Overrides com. Implements com. Method called to locate deserializer for specified JSON tree node type. |
| public boolean | hasDeserializerFor(DeserializationConfig config, Class<?> valueType)
Overrides default com. 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, JsonDeserializer<?>> _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<?>, JsonDeserializer<?>> desers)
| |
| _find | back to summary |
|---|---|
| private final JsonDeserializer | |
| addDeserializer | back to summary |
|---|---|
| public <T> void addDeserializer(Class<T> forClass, JsonDeserializer<? extends T> deser) | |
| addDeserializers | back to summary |
|---|---|
public void addDeserializers(Map<Class<?>, JsonDeserializer<?>> desers)
| |
| findArrayDeserializer | back to summary |
|---|---|
| public JsonDeserializer Overrides com. Implements com. Doc from com. Method called to locate serializer 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 JsonDeserializer Overrides com. Implements com. Doc from com. 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 JsonDeserializer Overrides com. Implements com. Doc from com. Method called to locate serializer 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 JsonDeserializer Overrides com. Implements com. Doc from com. Method called to locate serializer 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 JsonDeserializer Overrides com. Implements com. Doc from com. Method called to locate deserializer for specified
| |
| findMapDeserializer | back to summary |
|---|---|
| public JsonDeserializer Overrides com. Implements com. Doc from com. 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 JsonDeserializer Overrides com. Implements com. Doc from com. Method called to locate serializer 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 JsonDeserializer Overrides com. Implements com. Doc from com. Method called to locate deserializer for value that is of referential type,
| |
| findTreeNodeDeserializer | back to summary |
|---|---|
| public JsonDeserializer Overrides com. Implements com. Doc from com. Method called to locate deserializer for specified JSON tree node type.
| |
| hasDeserializerFor | back to summary |
|---|---|
| public boolean hasDeserializerFor(DeserializationConfig config, Class<?> valueType) Overrides default com. Doc from com. 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. Method added in Jackson 2.13 now that Java 8 default implementations are available for use with interface definitions.
| |