public class JakartaXmlBindAnnotationModule
extends com.fasterxml.jackson.databind.Module
objectMapper.setAnnotationIntrospector(...);with combination of
JakartaXmlBindAnnotationIntrospector
and existing
default introspector(s) (if any), depending on configuration
(by default, JAXB annotations are used as JakartaXmlBindAnnotationModule.Priority.PRIMARY
annotations).Modifier and Type | Class and Description |
---|---|
static class |
JakartaXmlBindAnnotationModule.Priority
Enumeration that defines how we use JAXB Annotations: either
as "primary" annotations (before any other already configured
introspector -- most likely default JacksonAnnotationIntrospector) or
as "secondary" annotations (after any other already configured
introspector(s)).
|
Modifier and Type | Field and Description |
---|---|
protected JakartaXmlBindAnnotationIntrospector |
_introspector
If the introspector is explicitly set or passed, we'll hold on to that
until registration.
|
protected String |
_nameUsedForXmlValue
Value to pass to
JakartaXmlBindAnnotationIntrospector.setNameUsedForXmlValue(java.lang.String)
if introspector constructed by the module. |
protected com.fasterxml.jackson.annotation.JsonInclude.Include |
_nonNillableInclusion
Value to pass to
JakartaXmlBindAnnotationIntrospector.setNonNillableInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include)
if defined and non-null. |
protected JakartaXmlBindAnnotationModule.Priority |
_priority
Priority to use when registering annotation introspector: default
value is
JakartaXmlBindAnnotationModule.Priority.PRIMARY . |
Constructor and Description |
---|
JakartaXmlBindAnnotationModule() |
JakartaXmlBindAnnotationModule(JakartaXmlBindAnnotationIntrospector intr) |
Modifier and Type | Method and Description |
---|---|
String |
getModuleName() |
String |
getNameUsedForXmlValue() |
com.fasterxml.jackson.annotation.JsonInclude.Include |
getNonNillableInclusion() |
JakartaXmlBindAnnotationModule.Priority |
getPriority() |
JakartaXmlBindAnnotationModule |
setNameUsedForXmlValue(String name) |
JakartaXmlBindAnnotationModule |
setNonNillableInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include incl) |
JakartaXmlBindAnnotationModule |
setPriority(JakartaXmlBindAnnotationModule.Priority p)
Method for defining whether JAXB annotations should be added
as primary or secondary annotations (compared to already registered
annotations).
|
void |
setupModule(com.fasterxml.jackson.databind.Module.SetupContext context) |
com.fasterxml.jackson.core.Version |
version() |
protected JakartaXmlBindAnnotationModule.Priority _priority
JakartaXmlBindAnnotationModule.Priority.PRIMARY
.protected JakartaXmlBindAnnotationIntrospector _introspector
protected com.fasterxml.jackson.annotation.JsonInclude.Include _nonNillableInclusion
JakartaXmlBindAnnotationIntrospector.setNonNillableInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include)
if defined and non-null.protected String _nameUsedForXmlValue
JakartaXmlBindAnnotationIntrospector.setNameUsedForXmlValue(java.lang.String)
if introspector constructed by the module.public JakartaXmlBindAnnotationModule()
public JakartaXmlBindAnnotationModule(JakartaXmlBindAnnotationIntrospector intr)
public String getModuleName()
getModuleName
in class com.fasterxml.jackson.databind.Module
public com.fasterxml.jackson.core.Version version()
version
in interface com.fasterxml.jackson.core.Versioned
version
in class com.fasterxml.jackson.databind.Module
public void setupModule(com.fasterxml.jackson.databind.Module.SetupContext context)
setupModule
in class com.fasterxml.jackson.databind.Module
public JakartaXmlBindAnnotationModule setPriority(JakartaXmlBindAnnotationModule.Priority p)
NOTE: method MUST be called before registering the module -- calling afterwards will not have any effect on previous registrations.
public JakartaXmlBindAnnotationModule.Priority getPriority()
public JakartaXmlBindAnnotationModule setNonNillableInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include incl)
public com.fasterxml.jackson.annotation.JsonInclude.Include getNonNillableInclusion()
public JakartaXmlBindAnnotationModule setNameUsedForXmlValue(String name)
public String getNameUsedForXmlValue()
Copyright © 2022 FasterXML. All rights reserved.