Class SubtypeResolver
- java.lang.Object
-
- com.fasterxml.jackson.databind.jsontype.SubtypeResolver
-
- Direct Known Subclasses:
StdSubtypeResolver
public abstract class SubtypeResolver extends java.lang.Object
Helper object used for handling registration on resolving of super-types to sub-types.
-
-
Constructor Summary
Constructors Constructor Description SubtypeResolver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Collection<NamedType>
collectAndResolveSubtypes(AnnotatedClass baseType, MapperConfig<?> config, AnnotationIntrospector ai)
Deprecated.Since 2.6 Use eithercollectAndResolveSubtypesByClass(MapperConfig, AnnotatedClass)
orcollectAndResolveSubtypesByTypeId(MapperConfig, AnnotatedClass)
instead.java.util.Collection<NamedType>
collectAndResolveSubtypes(AnnotatedMember property, MapperConfig<?> config, AnnotationIntrospector ai, JavaType baseType)
Deprecated.java.util.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).java.util.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).java.util.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).java.util.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 void
registerSubtypes(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 void
registerSubtypes(java.lang.Class<?>... classes)
abstract void
registerSubtypes(java.util.Collection<java.lang.Class<?>> subtypes)
-
-
-
Method Detail
-
registerSubtypes
public abstract void registerSubtypes(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).
-
registerSubtypes
public abstract void registerSubtypes(java.lang.Class<?>... classes)
-
registerSubtypes
public abstract void registerSubtypes(java.util.Collection<java.lang.Class<?>> subtypes)
- Since:
- 2.9
-
collectAndResolveSubtypesByClass
public java.util.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.- Since:
- 2.6
-
collectAndResolveSubtypesByClass
public java.util.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.- Since:
- 2.6
-
collectAndResolveSubtypesByTypeId
public java.util.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.- Since:
- 2.6
-
collectAndResolveSubtypesByTypeId
public java.util.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.- Since:
- 2.6
-
collectAndResolveSubtypes
@Deprecated public java.util.Collection<NamedType> collectAndResolveSubtypes(AnnotatedMember property, MapperConfig<?> config, AnnotationIntrospector ai, JavaType baseType)
Deprecated.
-
collectAndResolveSubtypes
@Deprecated public java.util.Collection<NamedType> collectAndResolveSubtypes(AnnotatedClass baseType, MapperConfig<?> config, AnnotationIntrospector ai)
Deprecated.Since 2.6 Use eithercollectAndResolveSubtypesByClass(MapperConfig, AnnotatedClass)
orcollectAndResolveSubtypesByTypeId(MapperConfig, AnnotatedClass)
instead.
-
-