java.lang.Object
tools.jackson.databind.jsontype.SubtypeResolver
- All Implemented Interfaces:
Snapshottable<SubtypeResolver>
- Direct Known Subclasses:
StdSubtypeResolver
Helper object used for handling registration on resolving of super-types
to sub-types.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Collection<NamedType>collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedClass baseType) Method for finding out all reachable subtypes for given type, such that access is by type, typically needed for serialization (converting from type to type name).abstract Collection<NamedType>collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedMember property, JavaType baseType) Method for finding out all reachable subtypes for a property specified by given element (method or field), such that access is by type, typically needed for serialization (converting from type to type name).abstract Collection<NamedType>collectAndResolveSubtypesByTypeId(MapperConfig<?> config, AnnotatedClass baseType) Method for finding out all reachable subtypes for given type, such that access is by type id, typically needed for deserialization (converting from type id to type).abstract Collection<NamedType>collectAndResolveSubtypesByTypeId(MapperConfig<?> config, AnnotatedMember property, JavaType baseType) Method for finding out all reachable subtypes for a property specified by given element (method or field), such that access is by type id, typically needed for deserialization (converting from type id to type).abstract SubtypeResolverregisterSubtypes(Class<?>... classes) abstract SubtypeResolverregisterSubtypes(Collection<Class<?>> subtypes) abstract SubtypeResolverregisterSubtypes(NamedType... types) Method for registering specified subtypes (possibly including type names); for type entries without name, non-qualified class name as used as name (unless overridden by annotation).abstract SubtypeResolversnapshot()Method that has to create a new instance that contains same registration information as this instance, but is not linked to this instance.
-
Constructor Details
-
SubtypeResolver
public SubtypeResolver()
-
-
Method Details
-
snapshot
Method that has to create a new instance that contains same registration information as this instance, but is not linked to this instance.- Specified by:
snapshotin interfaceSnapshottable<SubtypeResolver>- Since:
- 3.0
-
registerSubtypes
Method for registering specified subtypes (possibly including type names); for type entries without name, non-qualified class name as used as name (unless overridden by annotation). -
registerSubtypes
-
registerSubtypes
-
collectAndResolveSubtypesByClass
public abstract Collection<NamedType> collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedMember property, JavaType baseType) Method for finding out all reachable subtypes for a property specified by given element (method or field), such that access is by type, typically needed for serialization (converting from type to type name).- Parameters:
baseType- Effective property base type to use; may differ from actual type of property; for structured types it is content (value) type and NOT structured type.
-
collectAndResolveSubtypesByClass
public abstract Collection<NamedType> collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedClass baseType) Method for finding out all reachable subtypes for given type, such that access is by type, typically needed for serialization (converting from type to type name).- Parameters:
baseType- Effective property base type to use; may differ from actual type of property; for structured types it is content (value) type and NOT structured type.
-
collectAndResolveSubtypesByTypeId
public abstract Collection<NamedType> collectAndResolveSubtypesByTypeId(MapperConfig<?> config, AnnotatedMember property, JavaType baseType) Method for finding out all reachable subtypes for a property specified by given element (method or field), such that access is by type id, typically needed for deserialization (converting from type id to type).- Parameters:
baseType- Effective property base type to use; may differ from actual type of property; for structured types it is content (value) type and NOT structured type.
-
collectAndResolveSubtypesByTypeId
public abstract Collection<NamedType> collectAndResolveSubtypesByTypeId(MapperConfig<?> config, AnnotatedClass baseType) Method for finding out all reachable subtypes for given type, such that access is by type id, typically needed for deserialization (converting from type id to type).- Parameters:
baseType- Effective property base type to use; may differ from actual type of property; for structured types it is content (value) type and NOT structured type.
-