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 JAXBContext` | `getJaxbContextForPackage(Package pack)`
    `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` | `initJaxbContext(Package packageInstance)` Create a JAXBContext with all the classes in the provided `Package`.
    `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(Package packageInstance)

      Create a JAXBContext with all the classes in the provided `Package`.
      Parameters:
        `packageInstance` -

    - #### 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` -

    - #### getJaxbContextForPackage

          public static JAXBContext getJaxbContextForPackage(Package pack)

    - #### getJaxbContextForClass

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

      Throws:
        `JAXBException`

    - #### reset

          public static void reset()

      Method to clear the cached instances.

Connector Packaging PHYSIOTHERAPIST 4.3.0 API
Copyright © {inceptionYear}-2023 eHealth. All Rights Reserved.