Package feign.jaxb
Class JAXBContextFactory
- java.lang.Object
-
- feign.jaxb.JAXBContextFactory
-
public final class JAXBContextFactory extends java.lang.ObjectCreates 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 classJAXBContextFactory.BuilderCreates instances ofJAXBContextFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.xml.bind.MarshallercreateMarshaller(java.lang.Class<?> clazz)Creates a newMarshallerthat handles the supplied class.javax.xml.bind.UnmarshallercreateUnmarshaller(java.lang.Class<?> clazz)Creates a newUnmarshallerthat handles the supplied class.
-
-
-
Method Detail
-
createUnmarshaller
public javax.xml.bind.Unmarshaller createUnmarshaller(java.lang.Class<?> clazz) throws javax.xml.bind.JAXBExceptionCreates a newUnmarshallerthat handles the supplied class.- Throws:
javax.xml.bind.JAXBException
-
createMarshaller
public javax.xml.bind.Marshaller createMarshaller(java.lang.Class<?> clazz) throws javax.xml.bind.JAXBExceptionCreates a newMarshallerthat handles the supplied class.- Throws:
javax.xml.bind.JAXBException
-
-