com.fasterxml.jackson.xml
Class JacksonXmlAnnotationIntrospector

java.lang.Object
  extended by org.codehaus.jackson.map.AnnotationIntrospector
      extended by org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector
          extended by com.fasterxml.jackson.xml.JacksonXmlAnnotationIntrospector
All Implemented Interfaces:
XmlAnnotationIntrospector

public class JacksonXmlAnnotationIntrospector
extends org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector
implements XmlAnnotationIntrospector

Extension of JacksonAnnotationIntrospector that is needed to support additional xml-specific annotation that Jackson provides. Note, however, that there is no JAXB annotation support here; that is provided with separate introspector (see JaxbAnnotationIntrospector).

Since:
1.7

Nested Class Summary
 
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
 
Constructor Summary
JacksonXmlAnnotationIntrospector()
           
 
Method Summary
protected  org.codehaus.jackson.map.jsontype.impl.StdTypeResolverBuilder _constructStdTypeResolverBuilder()
          We will override this method so that we can return instance that cleans up type id property name to be a valid xml name.
 String findDeserializablePropertyName(org.codehaus.jackson.map.introspect.AnnotatedField af)
           
 String findNamespace(org.codehaus.jackson.map.introspect.Annotated ann)
          Method that can be called to figure out generic namespace property for an annotated object.
 String findPropertyNameForParam(org.codehaus.jackson.map.introspect.AnnotatedParameter ap)
           
 String findSerializablePropertyName(org.codehaus.jackson.map.introspect.AnnotatedField af)
           
 String findSettablePropertyName(org.codehaus.jackson.map.introspect.AnnotatedMethod am)
           
 QName findWrapperElement(org.codehaus.jackson.map.introspect.Annotated ann)
          Method 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)
          Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggest it be output as an XML attribute or not (as element)
 
Methods inherited from class org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector
_findTypeResolver, _isIgnorable, findAutoDetectVisibility, findCachability, findContentDeserializer, findDeserializationContentType, findDeserializationKeyType, findDeserializationType, findDeserializer, findEnumValue, findFilterId, findGettablePropertyName, findIgnoreUnknownProperties, findKeyDeserializer, findPropertiesToIgnore, findPropertyContentTypeResolver, findPropertyTypeResolver, findReferenceType, findRootName, findSerializationInclusion, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationType, findSerializationTyping, findSerializationViews, findSerializer, findSubtypes, findTypeName, findTypeResolver, hasAnyGetterAnnotation, hasAnySetterAnnotation, hasAsValueAnnotation, hasCreatorAnnotation, isHandled, isIgnorableConstructor, isIgnorableField, isIgnorableMethod, isIgnorableType
 
Methods inherited from class org.codehaus.jackson.map.AnnotationIntrospector
allIntrospectors, allIntrospectors, findDeserializer, findSerializer, nopInstance, pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JacksonXmlAnnotationIntrospector

public JacksonXmlAnnotationIntrospector()
Method Detail

isOutputAsAttribute

public Boolean isOutputAsAttribute(org.codehaus.jackson.map.introspect.Annotated ann)
Description copied from interface: XmlAnnotationIntrospector
Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggest it be output as an XML attribute or not (as element)

Specified by:
isOutputAsAttribute in interface XmlAnnotationIntrospector

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

findWrapperElement

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

findSerializablePropertyName

public String findSerializablePropertyName(org.codehaus.jackson.map.introspect.AnnotatedField af)
Overrides:
findSerializablePropertyName in class org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector

findSettablePropertyName

public String findSettablePropertyName(org.codehaus.jackson.map.introspect.AnnotatedMethod am)
Overrides:
findSettablePropertyName in class org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector

findDeserializablePropertyName

public String findDeserializablePropertyName(org.codehaus.jackson.map.introspect.AnnotatedField af)
Overrides:
findDeserializablePropertyName in class org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector

findPropertyNameForParam

public String findPropertyNameForParam(org.codehaus.jackson.map.introspect.AnnotatedParameter ap)
Overrides:
findPropertyNameForParam in class org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector

_constructStdTypeResolverBuilder

protected org.codehaus.jackson.map.jsontype.impl.StdTypeResolverBuilder _constructStdTypeResolverBuilder()
We will override this method so that we can return instance that cleans up type id property name to be a valid xml name.

Overrides:
_constructStdTypeResolverBuilder in class org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector


Copyright © 2011 fasterxml.com. All Rights Reserved.