Class XmlTypeResolverBuilder

java.lang.Object
com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
com.fasterxml.jackson.dataformat.xml.XmlTypeResolverBuilder
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder>

public class XmlTypeResolverBuilder extends com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
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 Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
     
    protected static class 
     
  • Field Summary

    Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder

    _customIdResolver, _defaultImpl, _idType, _includeAs, _requireTypeIdForSubtypes, _typeIdVisible, _typeProperty
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    XmlTypeResolverBuilder(com.fasterxml.jackson.annotation.JsonTypeInfo.Value settings)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    _propName(String propName, com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType)
     
    protected static String
    Helper method for decoding "XML safe" Java class name back into actual class name
    protected static String
    Helper method for encoding regular Java class name in form that can be used as XML element name.
    protected com.fasterxml.jackson.databind.jsontype.TypeIdResolver
    idResolver(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config, com.fasterxml.jackson.databind.JavaType baseType, com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator subtypeValidator, Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes, boolean forSer, boolean forDeser)
     

    Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder

    _hasTypeResolver, _strictTypeIdHandling, allowPrimitiveTypes, buildTypeDeserializer, buildTypeSerializer, defaultImpl, defineDefaultImpl, getDefaultImpl, getTypeProperty, inclusion, init, init, isTypeIdVisible, noTypeInfoBuilder, reportInvalidBaseType, subTypeValidator, typeIdVisibility, typeProperty, verifyBaseTypeValidity, withDefaultImpl, withSettings

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • XmlTypeResolverBuilder

      public XmlTypeResolverBuilder()
    • XmlTypeResolverBuilder

      public XmlTypeResolverBuilder(com.fasterxml.jackson.annotation.JsonTypeInfo.Value settings)
  • Method Details

    • _propName

      protected String _propName(String propName, com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType)
      Overrides:
      _propName in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
    • idResolver

      protected com.fasterxml.jackson.databind.jsontype.TypeIdResolver idResolver(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config, com.fasterxml.jackson.databind.JavaType baseType, com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator subtypeValidator, Collection<com.fasterxml.jackson.databind.jsontype.NamedType> subtypes, boolean forSer, boolean forDeser)
      Overrides:
      idResolver in class com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
    • encodeXmlClassName

      protected static String encodeXmlClassName(String className)
      Helper method for encoding regular Java class name in form that can be used as XML element name.
    • decodeXmlClassName

      protected static String decodeXmlClassName(String className)
      Helper method for decoding "XML safe" Java class name back into actual class name