com.fasterxml.jackson.dataformat.xml
Class JacksonXmlAnnotationIntrospector

java.lang.Object
  extended by com.fasterxml.jackson.databind.AnnotationIntrospector
      extended by com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
          extended by com.fasterxml.jackson.dataformat.xml.JacksonXmlAnnotationIntrospector
All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned, XmlAnnotationIntrospector, Serializable

public class JacksonXmlAnnotationIntrospector
extends com.fasterxml.jackson.databind.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).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector
com.fasterxml.jackson.databind.AnnotationIntrospector.Pair, com.fasterxml.jackson.databind.AnnotationIntrospector.ReferenceProperty
 
Nested classes/interfaces inherited from interface com.fasterxml.jackson.dataformat.xml.XmlAnnotationIntrospector
XmlAnnotationIntrospector.Pair
 
Field Summary
protected  boolean _cfgDefaultUseWrapper
           
static boolean DEFAULT_USE_WRAPPER
          For backwards compatibility with 2.0, the default behavior is to assume use of List wrapper if no annotations are used.
 
Constructor Summary
JacksonXmlAnnotationIntrospector()
           
JacksonXmlAnnotationIntrospector(boolean defaultUseWrapper)
           
 
Method Summary
protected  com.fasterxml.jackson.databind.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.
protected  com.fasterxml.jackson.databind.PropertyName _findXmlName(com.fasterxml.jackson.databind.introspect.Annotated a)
           
 String findDeserializationName(com.fasterxml.jackson.databind.introspect.AnnotatedField af)
          Deprecated. 
 String findDeserializationName(com.fasterxml.jackson.databind.introspect.AnnotatedMethod am)
          Deprecated. 
 String findDeserializationName(com.fasterxml.jackson.databind.introspect.AnnotatedParameter ap)
          Deprecated. 
 com.fasterxml.jackson.databind.PropertyName findNameForDeserialization(com.fasterxml.jackson.databind.introspect.Annotated a)
           
 com.fasterxml.jackson.databind.PropertyName findNameForSerialization(com.fasterxml.jackson.databind.introspect.Annotated a)
           
 String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
          Method that can be called to figure out generic namespace property for an annotated object.
 com.fasterxml.jackson.databind.PropertyName findRootName(com.fasterxml.jackson.databind.introspect.AnnotatedClass ac)
           
 String findSerializationName(com.fasterxml.jackson.databind.introspect.AnnotatedField af)
          Deprecated. 
 String findSerializationName(com.fasterxml.jackson.databind.introspect.AnnotatedMethod am)
          Deprecated. 
 com.fasterxml.jackson.databind.PropertyName findWrapperName(com.fasterxml.jackson.databind.introspect.Annotated ann)
           
 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.
 
Methods inherited from class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector
_constructNoTypeResolverBuilder, _findTypeResolver, _isIgnorable, findAutoDetectVisibility, findContentDeserializer, findContentSerializer, findDeserializationContentType, findDeserializationKeyType, findDeserializationType, findDeserializer, findFilterId, findFormat, findFormat, findIgnoreUnknownProperties, findInjectableValueId, findKeyDeserializer, findKeySerializer, findNamingStrategy, findObjectIdInfo, findObjectReferenceInfo, findPOJOBuilder, findPOJOBuilderConfig, findPropertiesToIgnore, findPropertyContentTypeResolver, findPropertyTypeResolver, findReferenceType, findSerializationContentType, findSerializationInclusion, findSerializationKeyType, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationType, findSerializationTyping, findSerializer, findSubtypes, findTypeName, findTypeResolver, findUnwrappingNameTransformer, findValueInstantiator, findViews, hasAnyGetterAnnotation, hasAnySetterAnnotation, hasAsValueAnnotation, hasCreatorAnnotation, hasIgnoreMarker, hasRequiredMarker, isAnnotationBundle, isHandled, isIgnorableType, isTypeId, version
 
Methods inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector
allIntrospectors, allIntrospectors, findEnumValue, nopInstance, pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_USE_WRAPPER

public static final boolean DEFAULT_USE_WRAPPER
For backwards compatibility with 2.0, the default behavior is to assume use of List wrapper if no annotations are used.

See Also:
Constant Field Values

_cfgDefaultUseWrapper

protected final boolean _cfgDefaultUseWrapper
Constructor Detail

JacksonXmlAnnotationIntrospector

public JacksonXmlAnnotationIntrospector()

JacksonXmlAnnotationIntrospector

public JacksonXmlAnnotationIntrospector(boolean defaultUseWrapper)
Method Detail

findWrapperName

public com.fasterxml.jackson.databind.PropertyName findWrapperName(com.fasterxml.jackson.databind.introspect.Annotated ann)
Overrides:
findWrapperName in class com.fasterxml.jackson.databind.AnnotationIntrospector

findRootName

public com.fasterxml.jackson.databind.PropertyName findRootName(com.fasterxml.jackson.databind.introspect.AnnotatedClass ac)
Overrides:
findRootName in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

findNamespace

public String findNamespace(com.fasterxml.jackson.databind.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(com.fasterxml.jackson.databind.introspect.Annotated ann)
Description copied from interface: XmlAnnotationIntrospector
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)

Specified by:
isOutputAsAttribute in interface XmlAnnotationIntrospector

isOutputAsText

public Boolean isOutputAsText(com.fasterxml.jackson.databind.introspect.Annotated ann)
Description copied from interface: XmlAnnotationIntrospector
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.

Specified by:
isOutputAsText in interface XmlAnnotationIntrospector

findNameForSerialization

public com.fasterxml.jackson.databind.PropertyName findNameForSerialization(com.fasterxml.jackson.databind.introspect.Annotated a)
Overrides:
findNameForSerialization in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

findSerializationName

@Deprecated
public String findSerializationName(com.fasterxml.jackson.databind.introspect.AnnotatedField af)
Deprecated. 

Overrides:
findSerializationName in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

findSerializationName

@Deprecated
public String findSerializationName(com.fasterxml.jackson.databind.introspect.AnnotatedMethod am)
Deprecated. 

Overrides:
findSerializationName in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

findNameForDeserialization

public com.fasterxml.jackson.databind.PropertyName findNameForDeserialization(com.fasterxml.jackson.databind.introspect.Annotated a)
Overrides:
findNameForDeserialization in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

findDeserializationName

@Deprecated
public String findDeserializationName(com.fasterxml.jackson.databind.introspect.AnnotatedField af)
Deprecated. 

Overrides:
findDeserializationName in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

findDeserializationName

@Deprecated
public String findDeserializationName(com.fasterxml.jackson.databind.introspect.AnnotatedMethod am)
Deprecated. 

Overrides:
findDeserializationName in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

findDeserializationName

@Deprecated
public String findDeserializationName(com.fasterxml.jackson.databind.introspect.AnnotatedParameter ap)
Deprecated. 

Overrides:
findDeserializationName in class com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

_constructStdTypeResolverBuilder

protected com.fasterxml.jackson.databind.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 com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector

_findXmlName

protected com.fasterxml.jackson.databind.PropertyName _findXmlName(com.fasterxml.jackson.databind.introspect.Annotated a)


Copyright © 2012 FasterXML. All Rights Reserved.