public class JaxbAnnotationModule
extends com.fasterxml.jackson.databind.Module
objectMapper.setAnnotationIntrospector(...);with combination of
JaxbAnnotationIntrospector
and existing
default introspector(s) (if any), depending on configuration
(by default, JAXB annotations are used as JaxbAnnotationModule.Priority.PRIMARY
annotations).Modifier and Type | Class and Description |
---|---|
static class |
JaxbAnnotationModule.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 JaxbAnnotationIntrospector |
_introspector
If the introspector is explicitly set or passed, we'll hold on to that
until registration.
|
protected com.fasterxml.jackson.annotation.JsonInclude.Include |
_nonNillableInclusion
Value to pass to
JaxbAnnotationIntrospector.setNonNillableInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include)
if defined and non-null. |
protected JaxbAnnotationModule.Priority |
_priority
Priority to use when registering annotation introspector: default
value is
JaxbAnnotationModule.Priority.PRIMARY . |
Constructor and Description |
---|
JaxbAnnotationModule() |
JaxbAnnotationModule(JaxbAnnotationIntrospector intr) |
Modifier and Type | Method and Description |
---|---|
String |
getModuleName() |
com.fasterxml.jackson.annotation.JsonInclude.Include |
getNonNillableInclusion() |
JaxbAnnotationModule.Priority |
getPriority() |
JaxbAnnotationModule |
setNonNillableInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include incl) |
JaxbAnnotationModule |
setPriority(JaxbAnnotationModule.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 JaxbAnnotationModule.Priority _priority
JaxbAnnotationModule.Priority.PRIMARY
.protected JaxbAnnotationIntrospector _introspector
protected com.fasterxml.jackson.annotation.JsonInclude.Include _nonNillableInclusion
JaxbAnnotationIntrospector.setNonNillableInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include)
if defined and non-null.public JaxbAnnotationModule()
public JaxbAnnotationModule(JaxbAnnotationIntrospector 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 JaxbAnnotationModule setPriority(JaxbAnnotationModule.Priority p)
NOTE: method MUST be called before registering the module -- calling afterwards will not have any effect on previous registrations.
public JaxbAnnotationModule.Priority getPriority()
public JaxbAnnotationModule setNonNillableInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include incl)
public com.fasterxml.jackson.annotation.JsonInclude.Include getNonNillableInclusion()
Copyright © 2017 FasterXML. All rights reserved.