Package feign.jaxb
Class JAXBContextFactory
- java.lang.Object
-
- feign.jaxb.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JAXBContextFactory.Builder
Creates instances ofJAXBContextFactory
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.xml.bind.Marshaller
createMarshaller(java.lang.Class<?> clazz)
Creates a newMarshaller
that handles the supplied class.javax.xml.bind.Unmarshaller
createUnmarshaller(java.lang.Class<?> clazz)
Creates a newUnmarshaller
that handles the supplied class.
-
-
-
Method Detail
-
createUnmarshaller
public javax.xml.bind.Unmarshaller createUnmarshaller(java.lang.Class<?> clazz) throws javax.xml.bind.JAXBException
Creates a newUnmarshaller
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 newMarshaller
that handles the supplied class.- Throws:
javax.xml.bind.JAXBException
-
-