Class XmlRootNameLookup

java.lang.Object
com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup
All Implemented Interfaces:
Serializable

public class XmlRootNameLookup extends Object implements Serializable
Helper class used for efficiently finding root element name used with XML serializations.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final com.fasterxml.jackson.databind.util.LRUMap<com.fasterxml.jackson.databind.type.ClassKey,QName>
    For efficient operation, let's try to minimize number of times we need to introspect root element name to use.
    static final QName
    If all we get to serialize is a null, there's no way to figure out expected root name; so let's just default to literal "null".
    private static final long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private String
    _findNamespace(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config, com.fasterxml.jackson.databind.AnnotationIntrospector ai, com.fasterxml.jackson.databind.introspect.AnnotatedClass ann)
     
    protected QName
    _findRootName(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config, Class<?> rootType)
     
    private QName
    _qname(String ns, String localName)
     
    findRootName(com.fasterxml.jackson.databind.JavaType rootType, com.fasterxml.jackson.databind.cfg.MapperConfig<?> config)
     
    findRootName(Class<?> rootType, com.fasterxml.jackson.databind.cfg.MapperConfig<?> config)
     
    protected Object
     

    Methods inherited from class java.lang.Object

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

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • ROOT_NAME_FOR_NULL

      public static final QName ROOT_NAME_FOR_NULL
      If all we get to serialize is a null, there's no way to figure out expected root name; so let's just default to literal "null".
    • _rootNames

      protected final transient com.fasterxml.jackson.databind.util.LRUMap<com.fasterxml.jackson.databind.type.ClassKey,QName> _rootNames
      For efficient operation, let's try to minimize number of times we need to introspect root element name to use.

      Note: changed to transient for 2.3; no point in serializing such state

  • Constructor Details

    • XmlRootNameLookup

      public XmlRootNameLookup()
  • Method Details

    • readResolve

      protected Object readResolve()
    • findRootName

      public QName findRootName(com.fasterxml.jackson.databind.JavaType rootType, com.fasterxml.jackson.databind.cfg.MapperConfig<?> config)
    • findRootName

      public QName findRootName(Class<?> rootType, com.fasterxml.jackson.databind.cfg.MapperConfig<?> config)
    • _findRootName

      protected QName _findRootName(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config, Class<?> rootType)
    • _qname

      private QName _qname(String ns, String localName)
    • _findNamespace

      private String _findNamespace(com.fasterxml.jackson.databind.cfg.MapperConfig<?> config, com.fasterxml.jackson.databind.AnnotationIntrospector ai, com.fasterxml.jackson.databind.introspect.AnnotatedClass ann)