com.fasterxml.jackson.dataformat.xml
Interface XmlAnnotationIntrospector

All Known Implementing Classes:
JacksonXmlAnnotationIntrospector, XmlAnnotationIntrospector.Pair, XmlJaxbAnnotationIntrospector

public interface XmlAnnotationIntrospector

Additional extension interface used above and beyond AnnotationIntrospector to handle XML-specific configuration.


Nested Class Summary
static class XmlAnnotationIntrospector.Pair
          Extension of AnnotationIntrospector.Pair that can also dispatch 'XmlAnnotationIntrospector' methods.
 
Method Summary
 String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
          Method that can be called to figure out generic namespace property for an annotated object.
 QName findRootElement(com.fasterxml.jackson.databind.introspect.Annotated ann)
          Method used to find out name to use for the outermost (root) XML element name when serializing (since there is no property that would define it); this overrides default name based on type of object.
 QName findWrapperElement(com.fasterxml.jackson.databind.introspect.Annotated ann)
          Method used to check if specified property has annotation that indicates that it should be wrapped in an element; and if so, name to use.
 Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
          Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it be output as an XML attribute or not (as element)
 Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
          Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it should be serialized as text, without element wrapper.
 

Method Detail

findNamespace

String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
Method that can be called to figure out generic namespace property for an annotated object.

Returns:
Null if annotated thing does not define any namespace information; non-null namespace (which may be empty String) otherwise

findWrapperElement

QName findWrapperElement(com.fasterxml.jackson.databind.introspect.Annotated ann)
Method used to check if specified property has annotation that indicates that it should be wrapped in an element; and if so, name to use. Note: local name of "" is used to indicate that name should default to using name (local name and namespace) of property itself.


findRootElement

QName findRootElement(com.fasterxml.jackson.databind.introspect.Annotated ann)
Method used to find out name to use for the outermost (root) XML element name when serializing (since there is no property that would define it); this overrides default name based on type of object.


isOutputAsAttribute

Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.introspect.Annotated ann)
Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it be output as an XML attribute or not (as element)


isOutputAsText

Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it should be serialized as text, without element wrapper.



Copyright © 2012 fasterxml.com. All Rights Reserved.