com.fasterxml.jackson.xml.jaxb
Class XmlJaxbAnnotationIntrospector

java.lang.Object
  extended by org.codehaus.jackson.map.AnnotationIntrospector
      extended by org.codehaus.jackson.xc.JaxbAnnotationIntrospector
          extended by com.fasterxml.jackson.xml.jaxb.XmlJaxbAnnotationIntrospector
All Implemented Interfaces:
XmlAnnotationIntrospector, org.codehaus.jackson.Versioned

public class XmlJaxbAnnotationIntrospector
extends org.codehaus.jackson.xc.JaxbAnnotationIntrospector
implements XmlAnnotationIntrospector

Alternative AnnotationIntrospector implementation that builds on introspector from Jackson XC package that uses JAXB annotations, not Jackson annotations.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.jackson.xc.JaxbAnnotationIntrospector
org.codehaus.jackson.xc.JaxbAnnotationIntrospector.PropertyDescriptors
 
Nested classes/interfaces inherited from class org.codehaus.jackson.map.AnnotationIntrospector
org.codehaus.jackson.map.AnnotationIntrospector.Pair, org.codehaus.jackson.map.AnnotationIntrospector.ReferenceProperty
 
Nested classes/interfaces inherited from interface com.fasterxml.jackson.xml.XmlAnnotationIntrospector
XmlAnnotationIntrospector.Pair
 
Field Summary
 
Fields inherited from class org.codehaus.jackson.xc.JaxbAnnotationIntrospector
_dataHandlerDeserializer, _dataHandlerSerializer, _jaxbPackageName, MARKER_FOR_DEFAULT
 
Constructor Summary
XmlJaxbAnnotationIntrospector()
           
 
Method Summary
 String findNamespace(org.codehaus.jackson.map.introspect.Annotated ann)
          Method that can be called to figure out generic namespace property for an annotated object.
 QName findRootElement(org.codehaus.jackson.map.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(org.codehaus.jackson.map.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(org.codehaus.jackson.map.introspect.Annotated ann)
          Here we assume fairly simple logic; if there is XmlAttribute to be found, we consider it an attibute; if XmlElement, not-an-attribute; and otherwise we will consider there to be no information.
 
Methods inherited from class org.codehaus.jackson.xc.JaxbAnnotationIntrospector
_doFindDeserializationType, _typeResolverFromXmlElements, findAccessType, findAdapter, findAdapterForClass, findAnnotation, findAutoDetectVisibility, findCachability, findContentDeserializer, findDeserializablePropertyName, findDeserializationContentType, findDeserializationKeyType, findDeserializationType, findDeserializer, findEnumValue, findFieldAnnotation, findGettablePropertyName, findIgnoreUnknownProperties, findJaxbPropertyName, findJaxbSpecifiedPropertyName, findKeyDeserializer, findPropertiesToIgnore, findPropertyContentTypeResolver, findPropertyDescriptor, findPropertyNameForParam, findPropertyTypeResolver, findRootName, findSerializablePropertyName, findSerializationInclusion, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationType, findSerializationTyping, findSerializationViews, findSerializer, findSettablePropertyName, findSubtypes, findTypeName, findTypeResolver, getDescriptors, hasAnySetterAnnotation, hasAsValueAnnotation, hasCreatorAnnotation, isHandled, isIgnorableConstructor, isIgnorableField, isIgnorableMethod, isIgnorableType, isIndexedType, isInvisible, version
 
Methods inherited from class org.codehaus.jackson.map.AnnotationIntrospector
allIntrospectors, allIntrospectors, findContentSerializer, findDeserializer, findFilterId, findKeySerializer, findReferenceType, findSerializationContentType, findSerializationKeyType, findSerializer, hasAnyGetterAnnotation, nopInstance, pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlJaxbAnnotationIntrospector

public XmlJaxbAnnotationIntrospector()
Method Detail

findNamespace

public String findNamespace(org.codehaus.jackson.map.introspect.Annotated ann)
Description copied from interface: XmlAnnotationIntrospector
Method that can be called to figure out generic namespace property for an annotated object.

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

isOutputAsAttribute

public Boolean isOutputAsAttribute(org.codehaus.jackson.map.introspect.Annotated ann)
Here we assume fairly simple logic; if there is XmlAttribute to be found, we consider it an attibute; if XmlElement, not-an-attribute; and otherwise we will consider there to be no information. Caller is likely to default to considering things as elements.

Specified by:
isOutputAsAttribute in interface XmlAnnotationIntrospector

findWrapperElement

public QName findWrapperElement(org.codehaus.jackson.map.introspect.Annotated ann)
Description copied from interface: XmlAnnotationIntrospector
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.

Specified by:
findWrapperElement in interface XmlAnnotationIntrospector

findRootElement

public QName findRootElement(org.codehaus.jackson.map.introspect.Annotated ann)
Description copied from interface: XmlAnnotationIntrospector
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.

Specified by:
findRootElement in interface XmlAnnotationIntrospector


Copyright © 2011 fasterxml.com. All Rights Reserved.