public class JaxbAnnotationModule extends 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)).
|
Module.SetupContext
Modifier and Type | Field and Description |
---|---|
protected JaxbAnnotationModule.Priority |
_priority
Priority to use when registering annotation introspector: default
value is
JaxbAnnotationModule.Priority.PRIMARY . |
Constructor and Description |
---|
JaxbAnnotationModule() |
Modifier and Type | Method and Description |
---|---|
String |
getModuleName()
Method that returns a display that can be used by Jackson
for informational purposes, as well as in associating extensions with
module that provides them.
|
JaxbAnnotationModule.Priority |
getPriority() |
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(Module.SetupContext context)
Method called by
ObjectMapper when module is registered. |
Version |
version()
Method that returns version of this module.
|
protected JaxbAnnotationModule.Priority _priority
JaxbAnnotationModule.Priority.PRIMARY
.public String getModuleName()
Module
getModuleName
in class Module
public Version version()
Module
public void setupModule(Module.SetupContext context)
Module
ObjectMapper
when module is registered.
It is called to let module register functionality it provides,
using callback methods passed-in context object exposes.setupModule
in class 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()
Copyright © 2016 JBoss by Red Hat. All rights reserved.