Class StdSubtypeResolver

    • Constructor Detail

      • StdSubtypeResolver

        public StdSubtypeResolver()
    • Method Detail

      • copy

        public SubtypeResolver copy()
        Description copied from class: SubtypeResolver
        Method called by ObjectMapper.copy() to make sure that SubtypeResolver instances used by two independent mappers can not cause thread-safety issues: if resolver is immutable, it may return this, but if not, it should create a copy with same configuration and return that instead.
        Overrides:
        copy in class SubtypeResolver
        Returns:
        Either new instance with same configuration as this one (if instances are mutable), or this instance (if immutable)
      • 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.util.Collection<java.lang.Class<?>> subtypes)
        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 baseType)
        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
        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.