Package feign.jaxb

Class JAXBContextFactory


  • public final class JAXBContextFactory
    extends java.lang.Object
    Creates and caches JAXB contexts as well as creates Marshallers and Unmarshallers for each context. Since JAXB contexts creation can be an expensive task, JAXB context can be preloaded on factory creation otherwise they will be created and cached dynamically when needed.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.xml.bind.Marshaller createMarshaller​(java.lang.Class<?> clazz)
      Creates a new Marshaller that handles the supplied class.
      javax.xml.bind.Unmarshaller createUnmarshaller​(java.lang.Class<?> clazz)
      Creates a new Unmarshaller that handles the supplied class.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createUnmarshaller

        public javax.xml.bind.Unmarshaller createUnmarshaller​(java.lang.Class<?> clazz)
                                                       throws javax.xml.bind.JAXBException
        Creates a new Unmarshaller that handles the supplied class.
        Throws:
        javax.xml.bind.JAXBException
      • createMarshaller

        public javax.xml.bind.Marshaller createMarshaller​(java.lang.Class<?> clazz)
                                                   throws javax.xml.bind.JAXBException
        Creates a new Marshaller that handles the supplied class.
        Throws:
        javax.xml.bind.JAXBException