Top Description Fields Constructors Methods
com.fasterxml.jackson.dataformat.xml

public Class DefaultingXmlTypeResolverBuilder

extends DefaultTypeResolverBuilder
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.util.Collection, com.fasterxml.jackson.annotation.JsonTypeInfo, com.fasterxml.jackson.databind.*, .ObjectMapper.DefaultTyping, com.fasterxml.jackson.databind.cfg.MapperConfig, com.fasterxml.jackson.databind.jsontype.NamedType, .PolymorphicTypeValidator, .TypeIdResolver, com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder, com.fasterxml.jackson.dataformat.xml.util.StaxUtil

Sub-class of StdTypeResolverBuilder specifically used with Default Typing.

Composition/sub-classing gets quite tricky here: ideally we would just extend XmlTypeResolverBuilder but unfortunately inheritance hierarchy does not allow this.

Since
2.10

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder:
_appliesFor_subtypeValidator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected TypeIdResolver
idResolver(MapperConfig<?> config, JavaType baseType, PolymorphicTypeValidator subtypeValidator, Collection<NamedType> subtypes, boolean forSer, boolean forDeser)

Overrides com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder.idResolver.

Helper method that will either return configured custom type id resolver, or construct a standard resolver given configuration.
public StdTypeResolverBuilder
init(JsonTypeInfo.Id
Which type metadata is used
idType
,
TypeIdResolver
(optional) Custom type id resolver used, if any
idRes
)

Overrides com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder.init.

Implements com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder.init.

Initialization method that is called right after constructing the builder instance.
public StdTypeResolverBuilder
typeProperty(String
Name of JSON property to use for including type information
typeIdPropName
)

Overrides com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder.typeProperty.

Implements com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder.typeProperty.

Method for constructing an instance with specified type property name (property name to use for type id when using "as-property" inclusion).
Inherited from com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder:
buildTypeDeserializerbuildTypeSerializerconstructsubTypeValidatoruseForTypewithDefaultImpl

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder.serialVersionUID.

Constructor Detail

DefaultingXmlTypeResolverBuilderback to summary
public DefaultingXmlTypeResolverBuilder(ObjectMapper.DefaultTyping t, PolymorphicTypeValidator ptv)

Method Detail

idResolverback to summary
protected TypeIdResolver idResolver(MapperConfig<?> config, JavaType baseType, PolymorphicTypeValidator subtypeValidator, Collection<NamedType> subtypes, boolean forSer, boolean forDeser)

Overrides com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder.idResolver.

Doc from com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder.idResolver.

Helper method that will either return configured custom type id resolver, or construct a standard resolver given configuration.

Annotations
@Override
initback to summary
public StdTypeResolverBuilder init(JsonTypeInfo.Id idType, TypeIdResolver idRes)

Overrides com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder.init.

Implements com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder.init.

Doc from com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder.init.

Initialization method that is called right after constructing the builder instance.

Parameters
idType:JsonTypeInfo.Id

Which type metadata is used

idRes:TypeIdResolver

(optional) Custom type id resolver used, if any

Returns:StdTypeResolverBuilder

Resulting builder instance (usually this builder, but not necessarily)

Annotations
@Override
typePropertyback to summary
public StdTypeResolverBuilder typeProperty(String typeIdPropName)

Overrides com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder.typeProperty.

Implements com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder.typeProperty.

Doc from com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder.typeProperty.

Method for constructing an instance with specified type property name (property name to use for type id when using "as-property" inclusion).

Parameters
typeIdPropName:String

Doc from com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder.typeProperty.

Name of JSON property to use for including type information

Returns:StdTypeResolverBuilder

Doc from com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder.typeProperty.

Resulting builder instance (usually this builder, but may be a newly constructed instance for immutable builders}

Annotations
@Override