com.fasterxml.jackson.databind.jsontype

## 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 and Description
    `SubtypeResolver()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Collection<NamedType>` | `collectAndResolveSubtypes(AnnotatedClass baseType, MapperConfig<?> config, AnnotationIntrospector ai)` Deprecated. Since 2.6 Use either `collectAndResolveSubtypesByClass(MapperConfig, AnnotatedClass)` or `collectAndResolveSubtypesByTypeId(MapperConfig, AnnotatedClass)` instead.
    `java.util.Collection<NamedType>` | `collectAndResolveSubtypes(AnnotatedMember property, MapperConfig<?> config, AnnotationIntrospector ai, JavaType baseType)` Deprecated. Since 2.6 Use either `collectAndResolveSubtypesByClass(MapperConfig, AnnotatedMember, JavaType)` or `collectAndResolveSubtypesByTypeId(MapperConfig, AnnotatedMember, JavaType)` instead.
    `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(java.lang.Class<?>... classes)`
    `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).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SubtypeResolver

          public SubtypeResolver()

  - ### 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)

    - #### 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. Since 2.6 Use either `collectAndResolveSubtypesByClass(MapperConfig, AnnotatedMember, JavaType)` or `collectAndResolveSubtypesByTypeId(MapperConfig, AnnotatedMember, JavaType)` instead.

    - #### collectAndResolveSubtypes

          @Deprecated
          public java.util.Collection<NamedType> collectAndResolveSubtypes(AnnotatedClass baseType,
                                                                             MapperConfig<?> config,
                                                                             AnnotationIntrospector ai)

      Deprecated. Since 2.6 Use either `collectAndResolveSubtypesByClass(MapperConfig, AnnotatedClass)` or `collectAndResolveSubtypesByTypeId(MapperConfig, AnnotatedClass)` instead.