com.fasterxml.jackson.dataformat.xml.jaxb
Class XmlJaxbAnnotationIntrospector

java.lang.Object
  extended by com.fasterxml.jackson.databind.AnnotationIntrospector
      extended by com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
          extended by com.fasterxml.jackson.dataformat.xml.jaxb.XmlJaxbAnnotationIntrospector
All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned, XmlAnnotationIntrospector

public class XmlJaxbAnnotationIntrospector
extends com.fasterxml.jackson.module.jaxb.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 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
 
Fields inherited from class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector
_dataHandlerDeserializer, _dataHandlerSerializer, _ignoreXmlIDREF, _jaxbPackageName, _typeFactory, DEFAULT_IGNORE_XMLIDREF, MARKER_FOR_DEFAULT
 
Constructor Summary
XmlJaxbAnnotationIntrospector()
          Deprecated. 
XmlJaxbAnnotationIntrospector(com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
           
 
Method Summary
protected
<A extends Annotation>
A
findAnnotation(Class<A> annotationClass, com.fasterxml.jackson.databind.introspect.Annotated annotated, boolean includePackage, boolean includeClass, boolean includeSuperclasses)
           
 String findNamespace(com.fasterxml.jackson.databind.introspect.Annotated ann)
          Method that can be called to figure out generic namespace property for an annotated object.
 Boolean isOutputAsAttribute(com.fasterxml.jackson.databind.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.
 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.module.jaxb.JaxbAnnotationIntrospector
_doFindDeserializationType, _findContentAdapter, _propertyNameToString, _typeResolverFromXmlElements, findAccessType, findAutoDetectVisibility, findContentDeserializer, findContentSerializer, findDeserializationContentType, findDeserializationName, findDeserializationName, findDeserializationType, findDeserializer, findEnumValue, findIgnoreUnknownProperties, findKeyDeserializer, findNameForDeserialization, findNameForSerialization, findObjectIdInfo, findObjectReferenceInfo, findPropertyContentTypeResolver, findPropertyTypeResolver, findRootName, findSerializationInclusion, findSerializationName, findSerializationName, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationType, findSerializer, findSubtypes, findTypeName, findTypeResolver, findWrapperName, getTypeFactory, hasAnySetterAnnotation, hasAsValueAnnotation, hasCreatorAnnotation, hasIgnoreMarker, hasRequiredMarker, isIgnorableType, isJAXBAnnotation, version
 
Methods inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector
allIntrospectors, allIntrospectors, findDeserializationKeyType, findDeserializationName, findFilterId, findFormat, findFormat, findInjectableValueId, findKeySerializer, findNamingStrategy, findPOJOBuilder, findPOJOBuilderConfig, findPropertiesToIgnore, findReferenceType, findSerializationContentType, findSerializationKeyType, findSerializationTyping, findUnwrappingNameTransformer, findValueInstantiator, findViews, hasAnyGetterAnnotation, isAnnotationBundle, isHandled, isTypeId, nopInstance, pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlJaxbAnnotationIntrospector

@Deprecated
public XmlJaxbAnnotationIntrospector()
Deprecated. 


XmlJaxbAnnotationIntrospector

public XmlJaxbAnnotationIntrospector(com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
Method Detail

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)
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

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

findAnnotation

protected <A extends Annotation> A findAnnotation(Class<A> annotationClass,
                                                  com.fasterxml.jackson.databind.introspect.Annotated annotated,
                                                  boolean includePackage,
                                                  boolean includeClass,
                                                  boolean includeSuperclasses)


Copyright © 2012 FasterXML. All Rights Reserved.