Package feign.jaxb
Class JAXBContextFactory.Builder
- java.lang.Object
-
- feign.jaxb.JAXBContextFactory.Builder
-
- Enclosing class:
- JAXBContextFactory
public static class JAXBContextFactory.Builder extends java.lang.ObjectCreates instances ofJAXBContextFactory.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JAXBContextFactorybuild()Creates a newJAXBContextFactoryinstance with a lazy loading cached contextJAXBContextFactorybuild(java.util.List<java.lang.Class<?>> classes)Creates a newJAXBContextFactoryinstance.JAXBContextFactory.BuilderwithMarshallerFormattedOutput(java.lang.Boolean value)Sets the jaxb.formatted.output property of any Marshaller created by this factory.JAXBContextFactory.BuilderwithMarshallerFragment(java.lang.Boolean value)Sets the jaxb.fragment property of any Marshaller created by this factory.JAXBContextFactory.BuilderwithMarshallerJAXBEncoding(java.lang.String value)Sets the jaxb.encoding property of any Marshaller created by this factory.JAXBContextFactory.BuilderwithMarshallerNoNamespaceSchemaLocation(java.lang.String value)Sets the jaxb.noNamespaceSchemaLocation property of any Marshaller created by this factory.JAXBContextFactory.BuilderwithMarshallerSchemaLocation(java.lang.String value)Sets the jaxb.schemaLocation property of any Marshaller created by this factory.JAXBContextFactory.BuilderwithProperty(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 newJAXBContextFactoryinstance with a lazy loading cached context
-
build
public JAXBContextFactory build(java.util.List<java.lang.Class<?>> classes) throws javax.xml.bind.JAXBException
Creates a newJAXBContextFactoryinstance. 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
-
-