be.ehealth.technicalconnector.utils.impl

## Class JaxbContextFactory

- java.lang.Object
- - be.ehealth.technicalconnector.utils.impl.JaxbContextFactory

-     public final class JaxbContextFactory
      extends Object

  JaxbContextFactory.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JAXBContext` | `getJaxbContextForClass(Class<?>... classesToBeBound)`
    `static void` | `initJaxbContext(Class<?>... classesToBeBound)` Create a JAXBContext with all the referenced classes in input.
    `static void` | `initJaxbContext(Class<?> keyClass, boolean override, Class<?>... classesToBeBound)` Create a JAXBContext with all the referenced classes in classesToBeBound.
    `static void` | `reset()` Method to clear the cached instances.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### initJaxbContext

          public static void initJaxbContext(Class<?> keyClass,
                                             boolean override,
                                             Class<?>... classesToBeBound)

      Create a JAXBContext with all the referenced classes in classesToBeBound. Using the keyClass as context identifier. The typical use case for this method is the explicit binding of custom derived types that are members of the root keyClass: this will ensure the derived type is used vs the parent type during marshalling/unmarshalling. The override parameter can be used to recreate the context, in order to ensure the JAXBContext associated to the keyClass is refreshed with the up-to-date classes to be bound.
      Parameters:
        `keyClass` - the context cache key
        `override` - true if the context must be refreshed in the cache, false otherwise
        `classesToBeBound` - the classes to be put in the jaxb context for the given keyClass

    - #### initJaxbContext

          public static void initJaxbContext(Class<?>... classesToBeBound)

      Create a JAXBContext with all the referenced classes in input.
      Parameters:
        `classesToBeBound` -

    - #### getJaxbContextForClass

          public static JAXBContext getJaxbContextForClass(Class<?>... classesToBeBound)
                                                    throws JAXBException

      Throws:
        `JAXBException`

    - #### reset

          public static void reset()

      Method to clear the cached instances.

Connector Packaging generic 4.9.5 API
Copyright © {inceptionYear}-2026 eHealth. All Rights Reserved.