Package feign.jaxb
Class JAXBContextFactory.Builder
- java.lang.Object
-
- feign.jaxb.JAXBContextFactory.Builder
-
- Enclosing class:
- JAXBContextFactory
public static class JAXBContextFactory.Builder extends java.lang.Object
Creates instances ofJAXBContextFactory
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JAXBContextFactory
build()
Creates a newJAXBContextFactory
instance with a lazy loading cached contextJAXBContextFactory
build(java.util.List<java.lang.Class<?>> classes)
Creates a newJAXBContextFactory
instance.JAXBContextFactory.Builder
withMarshallerFormattedOutput(java.lang.Boolean value)
Sets the jaxb.formatted.output property of any Marshaller created by this factory.JAXBContextFactory.Builder
withMarshallerFragment(java.lang.Boolean value)
Sets the jaxb.fragment property of any Marshaller created by this factory.JAXBContextFactory.Builder
withMarshallerJAXBEncoding(java.lang.String value)
Sets the jaxb.encoding property of any Marshaller created by this factory.JAXBContextFactory.Builder
withMarshallerNoNamespaceSchemaLocation(java.lang.String value)
Sets the jaxb.noNamespaceSchemaLocation property of any Marshaller created by this factory.JAXBContextFactory.Builder
withMarshallerSchemaLocation(java.lang.String value)
Sets the jaxb.schemaLocation property of any Marshaller created by this factory.JAXBContextFactory.Builder
withProperty(java.lang.String key, java.lang.Object value)
Sets the given property of any Marshaller created by this factory.
-
-
-
Method Detail
-
withMarshallerJAXBEncoding
public JAXBContextFactory.Builder withMarshallerJAXBEncoding(java.lang.String value)
Sets the jaxb.encoding property of any Marshaller created by this factory.
-
withMarshallerSchemaLocation
public JAXBContextFactory.Builder withMarshallerSchemaLocation(java.lang.String value)
Sets the jaxb.schemaLocation property of any Marshaller created by this factory.
-
withMarshallerNoNamespaceSchemaLocation
public JAXBContextFactory.Builder withMarshallerNoNamespaceSchemaLocation(java.lang.String value)
Sets the jaxb.noNamespaceSchemaLocation property of any Marshaller created by this factory.
-
withMarshallerFormattedOutput
public JAXBContextFactory.Builder withMarshallerFormattedOutput(java.lang.Boolean value)
Sets the jaxb.formatted.output property of any Marshaller created by this factory.
-
withMarshallerFragment
public JAXBContextFactory.Builder withMarshallerFragment(java.lang.Boolean value)
Sets the jaxb.fragment property of any Marshaller created by this factory.
-
withProperty
public JAXBContextFactory.Builder withProperty(java.lang.String key, java.lang.Object value)
Sets the given property of any Marshaller created by this factory.Example :
new JAXBContextFactory.Builder() .withProperty("com.sun.xml.internal.bind.xmlHeaders", "<!DOCTYPE Example SYSTEM \"example.dtd\">") .build();
-
build
public JAXBContextFactory build()
Creates a newJAXBContextFactory
instance with a lazy loading cached context
-
build
public JAXBContextFactory build(java.util.List<java.lang.Class<?>> classes) throws javax.xml.bind.JAXBException
Creates a newJAXBContextFactory
instance. Pre-loads context cache with given classes- Parameters:
classes
-- Returns:
- ContextFactory with a pre-populated JAXBContext cache
- Throws:
javax.xml.bind.JAXBException
- if provided classes can't be used for JAXBContext generation most likely due to missing JAXB annotations
-
-