Top Description Inners Fields Constructors Methods
tools.jackson.dataformat.xml

public Class XmlTypeResolverBuilder

extends StdTypeResolverBuilder
Class Inheritance
Imports
java.util.Collection, com.fasterxml.jackson.annotation.JsonTypeInfo, tools.jackson.core.JacksonException, tools.jackson.databind.*, tools.jackson.databind.jsontype.NamedType, .PolymorphicTypeValidator, .TypeIdResolver, tools.jackson.databind.jsontype.impl.ClassNameIdResolver, .MinimalClassNameIdResolver, .StdTypeResolverBuilder, tools.jackson.dataformat.xml.util.StaxUtil

Custom specialization of StdTypeResolverBuilder; needed so that type id property name can be modified as necessary to make it legal XML element or attribute name.

Note

Since 2.17, property name cleansing only applied to default names (like "@class" and "@type") but not to explicitly specified ones (where caller presumably knows what to do).

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
protected static class

Field Summary

Inherited from tools.jackson.databind.jsontype.impl.StdTypeResolverBuilder:
_customIdResolver_defaultImpl_idType_includeAs_requireTypeIdForSubtypes_typeIdVisible_typeProperty

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected String
protected static String
decodeXmlClassName(String className)

Helper method for decoding "XML safe" Java class name back into actual class name

protected static String
encodeXmlClassName(String className)

Helper method for encoding regular Java class name in form that can be used as XML element name.

protected TypeIdResolver
idResolver(DatabindContext ctxt, JavaType baseType, PolymorphicTypeValidator subtypeValidator, Collection<NamedType> subtypes, boolean forSer, boolean forDeser)

Overrides tools.jackson.databind.jsontype.impl.StdTypeResolverBuilder.idResolver.

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

Inherited from tools.jackson.databind.jsontype.impl.StdTypeResolverBuilder:
_hasTypeResolver_strictTypeIdHandlingallowPrimitiveTypesbuildTypeDeserializerbuildTypeSerializerdefineDefaultImplgetDefaultImplgetTypePropertyinitisTypeIdVisiblenoTypeInfoBuilderreportInvalidBaseTypesubTypeValidatorverifyBaseTypeValiditywithDefaultImplwithSettings

Constructor Detail

XmlTypeResolverBuilderback to summary
public XmlTypeResolverBuilder(JsonTypeInfo.Value typeInfo)

Method Detail

_propNameback to summary
protected String _propName(String propName, JsonTypeInfo.Id idType)

Overrides tools.jackson.databind.jsontype.impl.StdTypeResolverBuilder._propName.

Annotations
@Override
decodeXmlClassNameback to summary
protected static String decodeXmlClassName(String className)

Helper method for decoding "XML safe" Java class name back into actual class name

encodeXmlClassNameback to summary
protected static String encodeXmlClassName(String className)

Helper method for encoding regular Java class name in form that can be used as XML element name.

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

Overrides tools.jackson.databind.jsontype.impl.StdTypeResolverBuilder.idResolver.

Doc from tools.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
tools.jackson.dataformat.xml back to summary

protected Class XmlTypeResolverBuilder.XmlClassNameIdResolver

extends ClassNameIdResolver
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from tools.jackson.databind.jsontype.impl.ClassNameIdResolver:
_allowedSubtypes_subTypeValidator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
idFromValue(DatabindContext ctxt, Object value)

Overrides tools.jackson.databind.jsontype.impl.ClassNameIdResolver.idFromValue.

Implements tools.jackson.databind.jsontype.TypeIdResolver.idFromValue.

Method called to serialize type of the type of given value as a String to include in serialized JSON content.

public JavaType
Inherited from tools.jackson.databind.jsontype.impl.ClassNameIdResolver:
_idFrom_typeFromIdconstructgetDescForKnownTypeIdsgetMechanismidFromValueAndType

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides tools.jackson.databind.jsontype.impl.ClassNameIdResolver.serialVersionUID.

Constructor Detail

XmlClassNameIdResolverback to summary
public XmlClassNameIdResolver(JavaType baseType, Collection<NamedType> subtypes, PolymorphicTypeValidator ptv)

Method Detail

idFromValueback to summary
public String idFromValue(DatabindContext ctxt, Object value)

Overrides tools.jackson.databind.jsontype.impl.ClassNameIdResolver.idFromValue.

Implements tools.jackson.databind.jsontype.TypeIdResolver.idFromValue.

Doc from tools.jackson.databind.jsontype.TypeIdResolver.idFromValue.

Method called to serialize type of the type of given value as a String to include in serialized JSON content.

Annotations
@Override
typeFromIdback to summary
public JavaType typeFromId(DatabindContext ctxt, String id) throws JacksonException

Overrides tools.jackson.databind.jsontype.impl.ClassNameIdResolver.typeFromId.

Implements tools.jackson.databind.jsontype.TypeIdResolver.typeFromId.

Doc from tools.jackson.databind.jsontype.TypeIdResolver.typeFromId.

Method called to resolve type from given type identifier.

Annotations
@Override
tools.jackson.dataformat.xml back to summary

protected Class XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver

extends MinimalClassNameIdResolver
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from tools.jackson.databind.jsontype.impl.MinimalClassNameIdResolver:
_basePackageName_basePackagePrefix

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
idFromValue(DatabindContext ctxt, Object value)

Overrides tools.jackson.databind.jsontype.impl.MinimalClassNameIdResolver.idFromValue.

Implements tools.jackson.databind.jsontype.TypeIdResolver.idFromValue.

Method called to serialize type of the type of given value as a String to include in serialized JSON content.

public JavaType
Inherited from tools.jackson.databind.jsontype.impl.MinimalClassNameIdResolver:
_typeFromIdconstructgetMechanismidFromValueAndType

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides tools.jackson.databind.jsontype.impl.MinimalClassNameIdResolver.serialVersionUID.

Constructor Detail

XmlMinimalClassNameIdResolverback to summary
public XmlMinimalClassNameIdResolver(JavaType baseType, Collection<NamedType> subtypes, PolymorphicTypeValidator ptv)

Method Detail

idFromValueback to summary
public String idFromValue(DatabindContext ctxt, Object value)

Overrides tools.jackson.databind.jsontype.impl.MinimalClassNameIdResolver.idFromValue.

Implements tools.jackson.databind.jsontype.TypeIdResolver.idFromValue.

Doc from tools.jackson.databind.jsontype.TypeIdResolver.idFromValue.

Method called to serialize type of the type of given value as a String to include in serialized JSON content.

Annotations
@Override
typeFromIdback to summary
public JavaType typeFromId(DatabindContext ctxt, String id) throws JacksonException

Overrides tools.jackson.databind.jsontype.impl.ClassNameIdResolver.typeFromId.

Implements tools.jackson.databind.jsontype.TypeIdResolver.typeFromId.

Doc from tools.jackson.databind.jsontype.TypeIdResolver.typeFromId.

Method called to resolve type from given type identifier.

Annotations
@Override