Class 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).
    • Constructor Detail

      • JaxbAnnotationModule

        public JaxbAnnotationModule()
    • Method Detail

      • getModuleName

        public java.lang.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

        public JaxbAnnotationModule setPriority​(JaxbAnnotationModule.Priority p)
        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.

      • 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​(java.lang.String name)
        Since:
        2.12
      • getNameUsedForXmlValue

        public java.lang.String getNameUsedForXmlValue()