StdSubtypeResolver
Date: 2016-12-04

com.fasterxml.jackson.databind.jsontype.impl

## Class StdSubtypeResolver

- java.lang.Object
- - com.fasterxml.jackson.databind.jsontype.SubtypeResolver
  - - com.fasterxml.jackson.databind.jsontype.impl.StdSubtypeResolver

- All Implemented Interfaces:
    java.io.Serializable

      public class StdSubtypeResolver
      extends SubtypeResolver
      implements java.io.Serializable

  Standard `SubtypeResolver` implementation.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.LinkedHashSet<NamedType>` | `_registeredSubtypes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StdSubtypeResolver()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `_collectAndResolve(AnnotatedClass annotatedType, NamedType namedType, MapperConfig<?> config, AnnotationIntrospector ai, java.util.HashMap<NamedType,NamedType> collectedSubtypes)` Method called to find subtypes for a specific type (class), using type (class) as the unique key (in case of conflicts).
    `protected void` | `_collectAndResolveByTypeId(AnnotatedClass annotatedType, NamedType namedType, MapperConfig<?> config, java.util.Set<java.lang.Class<?>> typesHandled, java.util.Map<java.lang.String,NamedType> byName)` Method called to find subtypes for a specific type (class), using type id as the unique key (in case of conflicts).
    `protected java.util.Collection<NamedType>` | `_combineNamedAndUnnamed(java.util.Set<java.lang.Class<?>> typesHandled, java.util.Map<java.lang.String,NamedType> byName)` Helper method used for merging explicitly named types and handled classes without explicit names.
    `java.util.Collection<NamedType>` | `collectAndResolveSubtypesByClass(MapperConfig<?> config, AnnotatedClass type)` 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 type)` 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).
    `void` | `registerSubtypes(java.lang.Class<?>... classes)`
    `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 com.fasterxml.jackson.databind.jsontype.SubtypeResolver

      `collectAndResolveSubtypes, collectAndResolveSubtypes`

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

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

- - ### Field Detail

    - #### _registeredSubtypes

          protected java.util.LinkedHashSet<NamedType> _registeredSubtypes

  - ### Constructor Detail

    - #### StdSubtypeResolver

          public StdSubtypeResolver()

  - ### Method Detail

    - #### registerSubtypes

          public void registerSubtypes(NamedType... types)

      Description copied from class: `SubtypeResolver`
      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).
      Specified by:
        `registerSubtypes` in class `SubtypeResolver`

    - #### registerSubtypes

          public void registerSubtypes(java.lang.Class<?>... classes)

      Specified by:
        `registerSubtypes` in class `SubtypeResolver`

    - #### collectAndResolveSubtypesByClass

          public java.util.Collection<NamedType> collectAndResolveSubtypesByClass(MapperConfig<?> config,
                                                                         AnnotatedMember property,
                                                                         JavaType baseType)

      Description copied from class: `SubtypeResolver`
      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).
      Overrides:
        `collectAndResolveSubtypesByClass` in class `SubtypeResolver`
        `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 java.util.Collection<NamedType> collectAndResolveSubtypesByClass(MapperConfig<?> config,
                                                                         AnnotatedClass type)

      Description copied from class: `SubtypeResolver`
      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).
      Overrides:
        `collectAndResolveSubtypesByClass` in class `SubtypeResolver`
        `type` - 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 java.util.Collection<NamedType> collectAndResolveSubtypesByTypeId(MapperConfig<?> config,
                                                                          AnnotatedMember property,
                                                                          JavaType baseType)

      Description copied from class: `SubtypeResolver`
      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).
      Overrides:
        `collectAndResolveSubtypesByTypeId` in class `SubtypeResolver`
        `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 java.util.Collection<NamedType> collectAndResolveSubtypesByTypeId(MapperConfig<?> config,
                                                                          AnnotatedClass type)

      Description copied from class: `SubtypeResolver`
      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).
      Overrides:
        `collectAndResolveSubtypesByTypeId` in class `SubtypeResolver`
        `type` - 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.

    - #### _collectAndResolve

          protected void _collectAndResolve(AnnotatedClass annotatedType,
                                NamedType namedType,
                                MapperConfig<?> config,
                                AnnotationIntrospector ai,
                                java.util.HashMap<NamedType,NamedType> collectedSubtypes)

      Method called to find subtypes for a specific type (class), using type (class) as the unique key (in case of conflicts).

    - #### _collectAndResolveByTypeId

          protected void _collectAndResolveByTypeId(AnnotatedClass annotatedType,
                                        NamedType namedType,
                                        MapperConfig<?> config,
                                        java.util.Set<java.lang.Class<?>> typesHandled,
                                        java.util.Map<java.lang.String,NamedType> byName)

      Method called to find subtypes for a specific type (class), using type id as the unique key (in case of conflicts).

    - #### _combineNamedAndUnnamed

          protected java.util.Collection<NamedType> _combineNamedAndUnnamed(java.util.Set<java.lang.Class<?>> typesHandled,
                                                                java.util.Map<java.lang.String,NamedType> byName)

      Helper method used for merging explicitly named types and handled classes without explicit names.