Top Description Constructors Methods
com.fasterxml.jackson.databind

public abstract Class AbstractTypeResolver

extends Object
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.databind.module.SimpleAbstractTypeResolver

Defines interface for resolvers that can resolve abstract types into concrete ones; either by using static mappings, or possibly by materializing implementations dynamically.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JavaType

Returns:

Type to map given input type (if mapping found) or null (if not).
findTypeMapping
(DeserializationConfig
Configuration in use
config
,
JavaType
Type to find mapping for
type
)

Try to locate a subtype for given abstract type, to either resolve to a concrete type, or at least to a more-specific (and hopefully supported) abstract type, one which may have registered deserializers.

public JavaType

Returns:

Resolved concrete type
resolveAbstractType
(DeserializationConfig
Configuration in use
config
,
JavaType
Type to resolve
type
)

Deprecated since 2.8 (may be removed from 2.9 or later)
Older variant of resolveAbstractType(DeserializationConfig, BeanDescription); obsoleted in 2.7
public JavaType

Returns:

Resolved concrete type (which should retain generic type parameters of input type, if any), if resolution succeeds; null if resolver does not know how to resolve given type
resolveAbstractType
(DeserializationConfig
Configuration in use
config
,
BeanDescription
Description of the POJO type to resolve
typeDesc
)

Method called to try to resolve an abstract type into concrete type (usually for purposes of deserializing), when no concrete implementation was found.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractTypeResolverback to summary
public AbstractTypeResolver()

Method Detail

findTypeMappingback to summary
public JavaType findTypeMapping(DeserializationConfig config, JavaType type)

Try to locate a subtype for given abstract type, to either resolve to a concrete type, or at least to a more-specific (and hopefully supported) abstract type, one which may have registered deserializers. Method is called before trying to locate registered deserializers (as well as standard abstract type defaulting that core Jackson does), so it is typically implemented to add custom mappings of common abstract types (like specify which concrete implementation to use for binding java.util.Lists).

Note that this method does not necessarily have to do full resolution of bindings; that is, it is legal to return type that could be further resolved: caller is expected to keep calling this method on registered resolvers, until a concrete type is located.

Parameters
config:DeserializationConfig

Configuration in use

type:JavaType

Type to find mapping for

Returns:JavaType

Type to map given input type (if mapping found) or null (if not).

resolveAbstractTypeback to summary
public JavaType resolveAbstractType(DeserializationConfig config, JavaType type)

Deprecated

since 2.8 (may be removed from 2.9 or later)

Older variant of resolveAbstractType(DeserializationConfig, BeanDescription); obsoleted in 2.7

Parameters
config:DeserializationConfig

Configuration in use

type:JavaType

Type to resolve

Returns:JavaType

Resolved concrete type

Annotations
@Deprecated
resolveAbstractTypeback to summary
public JavaType resolveAbstractType(DeserializationConfig config, BeanDescription typeDesc)

Method called to try to resolve an abstract type into concrete type (usually for purposes of deserializing), when no concrete implementation was found. It will be called after checking all other possibilities, including defaulting.

Parameters
config:DeserializationConfig

Configuration in use

typeDesc:BeanDescription

Description of the POJO type to resolve

Returns:JavaType

Resolved concrete type (which should retain generic type parameters of input type, if any), if resolution succeeds; null if resolver does not know how to resolve given type

Since
2.7