objectMapper.setAnnotationIntrospector(...);with combination of
JaxbAnnotationIntrospector and existing
default introspector(s) (if any), depending on configuration
(by default, JAXB annotations are used as Priority#PRIMARY
annotations).
| Modifier and Type | Class and Description |
|---|---|
| public static enum | JaxbAnnotationModule.
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 String | _nameUsedForXmlValue
Value to pass to
|
| protected JsonInclude. | _nonNillableInclusion
Value to pass to
|
| protected JaxbAnnotationModule. | _priority
Priority to use when registering annotation introspector: default
value is |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getModuleName()
Implements abstract com. 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. |
| public String | |
| public JsonInclude. | |
| public JaxbAnnotationModule. | |
| public JaxbAnnotationModule | |
| public JaxbAnnotationModule | |
| public JaxbAnnotationModule | setPriority(JaxbAnnotationModule.
Method for defining whether JAXB annotations should be added as primary or secondary annotations (compared to already registered annotations). |
| public void | setupModule(Module.
Implements abstract com. Method called by |
| public Version | version()
Implements abstract com. Implements com. Method that returns version of this module. |
| _introspector | back to summary |
|---|---|
| protected JaxbAnnotationIntrospector _introspector If the introspector is explicitly set or passed, we'll hold on to that until registration.
| |
| _nameUsedForXmlValue | back to summary |
|---|---|
| protected String _nameUsedForXmlValue Value to pass to
| |
| _nonNillableInclusion | back to summary |
|---|---|
| protected JsonInclude. Value to pass to
| |
| _priority | back to summary |
|---|---|
| protected JaxbAnnotationModule. Priority to use when registering annotation introspector: default
value is | |
| JaxbAnnotationModule | back to summary |
|---|---|
| public JaxbAnnotationModule() | |
| JaxbAnnotationModule | back to summary |
|---|---|
public JaxbAnnotationModule(JaxbAnnotationIntrospector intr)
| |
| getModuleName | back to summary |
|---|---|
| public String getModuleName() Implements abstract com. Doc from com. 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.
| |
| getNameUsedForXmlValue | back to summary |
|---|---|
| public String getNameUsedForXmlValue() | |
| getNonNillableInclusion | back to summary |
|---|---|
public JsonInclude.
| |
| getPriority | back to summary |
|---|---|
| public JaxbAnnotationModule. | |
| setNameUsedForXmlValue | back to summary |
|---|---|
public JaxbAnnotationModule setNameUsedForXmlValue(String name)
| |
| setNonNillableInclusion | back to summary |
|---|---|
public JaxbAnnotationModule setNonNillableInclusion(JsonInclude.
| |
| setPriority | back to summary |
|---|---|
| public JaxbAnnotationModule setPriority(JaxbAnnotationModule. Method for defining whether JAXB annotations should be added as primary or secondary annotations (compared to already registered annotations). Note method MUST be called before registering the module -- calling afterwards will not have any effect on previous registrations. | |
| setupModule | back to summary |
|---|---|
| public void setupModule(Module. Implements abstract com. Doc from com. Method called by
| |
| version | back to summary |
|---|---|
| public Version version() Implements abstract com. Implements com. Doc from com. Method that returns version of this module. Can be used by Jackson for informational purposes.
| |
Default choice is PRIMARY
Note that if you want to use JAXB annotations as the only annotations,
you must directly set annotation introspector by calling
com..
| Modifier and Type | Field and Description |
|---|---|
| public static final JaxbAnnotationModule. | |
| public static final JaxbAnnotationModule. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static JaxbAnnotationModule. | |
| public static JaxbAnnotationModule. |
| PRIMARY | back to summary |
|---|---|
| public static final JaxbAnnotationModule. | |
| SECONDARY | back to summary |
|---|---|
| public static final JaxbAnnotationModule. | |
| Priority | back to summary |
|---|---|
| private Priority() | |
| valueOf | back to summary |
|---|---|
| public static JaxbAnnotationModule. | |
| values | back to summary |
|---|---|
| public static JaxbAnnotationModule. | |