Class JaxbAnnotationModule

java.lang.Object
com.fasterxml.jackson.databind.Module
com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule
All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned

public class JaxbAnnotationModule extends com.fasterxml.jackson.databind.Module
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)
      Since:
      2.7
  • Method Details

    • getModuleName

      public String getModuleName()
      Specified by:
      getModuleName in class com.fasterxml.jackson.databind.Module
    • version

      public com.fasterxml.jackson.core.Version version()
      Specified by:
      version in interface com.fasterxml.jackson.core.Versioned
      Specified by:
      version in class com.fasterxml.jackson.databind.Module
    • setupModule

      public void setupModule(com.fasterxml.jackson.databind.Module.SetupContext context)
      Specified by:
      setupModule in class com.fasterxml.jackson.databind.Module
    • 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)
      Since:
      2.7
    • getNonNillableInclusion

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

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

      public String getNameUsedForXmlValue()