Class SubtypeResolver
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.jsontype.SubtypeResolver
- Direct Known Subclasses:
StdSubtypeResolver
Helper object used for handling registration on resolving of super-types
to sub-types.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncollectAndResolveSubtypes
(AnnotatedClass baseType, MapperConfig<?> config, AnnotationIntrospector ai) Deprecated.collectAndResolveSubtypes
(AnnotatedMember property, MapperConfig<?> config, AnnotationIntrospector ai, JavaType baseType) Deprecated.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).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).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).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).copy()
Method called byObjectMapper.copy()
to make sure thatSubtypeResolver
instances used by two independent mappers can not cause thread-safety issues: if resolver is immutable, it may returnthis
, but if not, it should create a copy with same configuration and return that instead.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
(Class<?>... classes) abstract void
registerSubtypes
(Collection<Class<?>> subtypes)
-
Constructor Details
-
SubtypeResolver
public SubtypeResolver()
-
-
Method Details
-
copy
Method called byObjectMapper.copy()
to make sure thatSubtypeResolver
instances used by two independent mappers can not cause thread-safety issues: if resolver is immutable, it may returnthis
, but if not, it should create a copy with same configuration and return that instead.- Returns:
- Either new instance with same configuration as this one (if instances are mutable), or this instance (if immutable)
- Since:
- 2.12
-
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
- Since:
- 2.9
-
collectAndResolveSubtypesByClass
public 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 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 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 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 Collection<NamedType> collectAndResolveSubtypes(AnnotatedMember property, MapperConfig<?> config, AnnotationIntrospector ai, JavaType baseType) Deprecated. -
collectAndResolveSubtypes
@Deprecated public Collection<NamedType> collectAndResolveSubtypes(AnnotatedClass baseType, MapperConfig<?> config, AnnotationIntrospector ai) Deprecated.Since 2.6 Use eithercollectAndResolveSubtypesByClass(MapperConfig, AnnotatedClass)
orcollectAndResolveSubtypesByTypeId(MapperConfig, AnnotatedClass)
instead.
-
collectAndResolveSubtypesByClass(MapperConfig, AnnotatedClass)
orcollectAndResolveSubtypesByTypeId(MapperConfig, AnnotatedClass)
instead.