Module tools.jackson.databind
Package tools.jackson.databind
Interface AnnotationIntrospector.XmlExtensions
- Enclosing class:
- AnnotationIntrospector
public static interface AnnotationIntrospector.XmlExtensions
Add-on extension used for XML-specific configuration, needed to decouple
format module functionality from pluggable introspection functionality
(especially JAXB-annotation related one).
- Since:
- 2.13
-
Method Summary
Modifier and TypeMethodDescriptionfindNamespace(MapperConfig<?> config, Annotated ann) Method that can be called to figure out generic namespace property for an annotated object.default PropertyNamefindXmlPropertyInnerName(MapperConfig<?> config, Annotated ann) Method for finding the fully-qualified inner element name specified via@JacksonXmlProperty(or similar) on a property accessor.isOutputAsAttribute(MapperConfig<?> config, 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 (if not, then as element)isOutputAsCData(MapperConfig<?> config, Annotated ann) Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it should be wrapped in a CDATA tag.isOutputAsText(MapperConfig<?> config, 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 Details
-
findNamespace
Method that can be called to figure out generic namespace property for an annotated object.- Parameters:
config- Configuration settings in effectann- Annotated entity to introspect- Returns:
- Null if annotated thing does not define any namespace information; non-null namespace (which may be empty String) otherwise.
-
isOutputAsAttribute
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 (if not, then as element)- Parameters:
config- Configuration settings in effectann- Annotated entity to introspect- Returns:
- Null if no indicator found;
TrueorFalseotherwise
-
isOutputAsText
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.- Parameters:
config- Configuration settings in effectann- Annotated entity to introspect- Returns:
- Null if no indicator found;
TrueorFalseotherwise
-
isOutputAsCData
Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it should be wrapped in a CDATA tag.- Parameters:
config- Configuration settings in effectann- Annotated entity to introspect- Returns:
- Null if no indicator found;
TrueorFalseotherwise
-
findXmlPropertyInnerName
Method for finding the fully-qualified inner element name specified via@JacksonXmlProperty(or similar) on a property accessor. Used to recover the inner element name for wrapped collections when the property name has been set to the wrapper name.- Parameters:
config- Configuration settings in effectann- Annotated entity to introspect- Returns:
- Inner element name if explicitly specified; null otherwise.
- Since:
- 3.2
-