Class JaxbAnnotationModule

java.lang.Object
tools.jackson.databind.JacksonModule
tools.jackson.module.jaxb.JaxbAnnotationModule
All Implemented Interfaces:
tools.jackson.core.Versioned

public class JaxbAnnotationModule extends tools.jackson.databind.JacksonModule
Module that can be registered to add support for JAXB annotations. It does basically equivalent of
   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).
  • Field Details

  • Constructor Details

    • JaxbAnnotationModule

      public JaxbAnnotationModule()
    • JaxbAnnotationModule

      public JaxbAnnotationModule(JaxbAnnotationIntrospector intr)
  • Method Details

    • getModuleName

      public String getModuleName()
      Specified by:
      getModuleName in class tools.jackson.databind.JacksonModule
    • version

      public tools.jackson.core.Version version()
      Specified by:
      version in interface tools.jackson.core.Versioned
      Specified by:
      version in class tools.jackson.databind.JacksonModule
    • setupModule

      public void setupModule(tools.jackson.databind.JacksonModule.SetupContext context)
      Specified by:
      setupModule in class tools.jackson.databind.JacksonModule
    • setPriority

      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.

    • getPriority

      public JaxbAnnotationModule.Priority getPriority()
    • setNonNillableInclusion

      public JaxbAnnotationModule setNonNillableInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include incl)
    • getNonNillableInclusion

      public com.fasterxml.jackson.annotation.JsonInclude.Include getNonNillableInclusion()
    • setNameUsedForXmlValue

      public JaxbAnnotationModule setNameUsedForXmlValue(String name)
      Since:
      2.12
    • getNameUsedForXmlValue

      public String getNameUsedForXmlValue()