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

public Class XmlRootNameLookup

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
javax.xml.namespace.QName, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.cfg.MapperConfig, com.fasterxml.jackson.databind.introspect.AnnotatedClass, com.fasterxml.jackson.databind.type.ClassKey, com.fasterxml.jackson.databind.util.LRUMap

Helper class used for efficiently finding root element name used with XML serializations.

Field Summary

Modifier and TypeField and Description
protected final transient LRUMap<ClassKey, QName>
_rootNames

For efficient operation, let's try to minimize number of times we need to introspect root element name to use.

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".

private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String
protected QName
_findRootName(MapperConfig<?> config, Class<?> rootType)

private QName
_qname(String ns, String localName)

public QName
findRootName(JavaType rootType, MapperConfig<?> config)

public QName
findRootName(Class<?> rootType, MapperConfig<?> config)

protected Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_rootNamesback to summary
protected final transient LRUMap<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

ROOT_NAME_FOR_NULLback to summary
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".

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

XmlRootNameLookupback to summary
public XmlRootNameLookup()

Method Detail

_findNamespaceback to summary
private String _findNamespace(MapperConfig<?> config, AnnotationIntrospector ai, AnnotatedClass ann)
_findRootNameback to summary
protected QName _findRootName(MapperConfig<?> config, Class<?> rootType)
_qnameback to summary
private QName _qname(String ns, String localName)
findRootNameback to summary
public QName findRootName(JavaType rootType, MapperConfig<?> config)
findRootNameback to summary
public QName findRootName(Class<?> rootType, MapperConfig<?> config)
readResolveback to summary
protected Object readResolve()