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 Object

  Helper object used for handling registration on resolving of super-types to sub-types.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SubtypeResolver()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Collection<NamedType>` | `collectAndResolveSubtypes(AnnotatedClass baseType, MapperConfig<?> config, AnnotationIntrospector ai)` Deprecated. Since 2.6 Use either `collectAndResolveSubtypesByClass(MapperConfig, AnnotatedClass)` or `collectAndResolveSubtypesByTypeId(MapperConfig, AnnotatedClass)` instead.
    `abstract 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.
    `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).
    `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).
    `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).
    `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(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(Class<?>... classes)

    - #### 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 abstract 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 abstract Collection<NamedType> collectAndResolveSubtypes(AnnotatedClass baseType,
                                                                                      MapperConfig<?> config,
                                                                                      AnnotationIntrospector ai)

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

Copyright © 2014–2015 FasterXML. All rights reserved.