public static class JAXBContextFactory.Builder extends Object
JAXBContextFactory
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
JAXBContextFactory |
build()
Creates a new
JAXBContextFactory instance with a lazy loading cached
context |
JAXBContextFactory |
build(List<Class<?>> classes)
Creates a new
JAXBContextFactory instance. |
JAXBContextFactory.Builder |
withMarshallerFormattedOutput(Boolean value)
Sets the jaxb.formatted.output property of any Marshaller created by this factory.
|
JAXBContextFactory.Builder |
withMarshallerFragment(Boolean value)
Sets the jaxb.fragment property of any Marshaller created by this factory.
|
JAXBContextFactory.Builder |
withMarshallerJAXBEncoding(String value)
Sets the jaxb.encoding property of any Marshaller created by this factory.
|
JAXBContextFactory.Builder |
withMarshallerNoNamespaceSchemaLocation(String value)
Sets the jaxb.noNamespaceSchemaLocation property of any Marshaller created by this factory.
|
JAXBContextFactory.Builder |
withMarshallerSchemaLocation(String value)
Sets the jaxb.schemaLocation property of any Marshaller created by this factory.
|
JAXBContextFactory.Builder |
withProperty(String key,
Object value)
Sets the given property of any Marshaller created by this factory.
|
public JAXBContextFactory.Builder withMarshallerJAXBEncoding(String value)
public JAXBContextFactory.Builder withMarshallerSchemaLocation(String value)
public JAXBContextFactory.Builder withMarshallerNoNamespaceSchemaLocation(String value)
public JAXBContextFactory.Builder withMarshallerFormattedOutput(Boolean value)
public JAXBContextFactory.Builder withMarshallerFragment(Boolean value)
public JAXBContextFactory.Builder withProperty(String key, Object value)
Example :
new JAXBContextFactory.Builder()
.withProperty("com.sun.xml.internal.bind.xmlHeaders", "<!DOCTYPE Example SYSTEM \"example.dtd\">")
.build();
public JAXBContextFactory build()
JAXBContextFactory
instance with a lazy loading cached
contextpublic JAXBContextFactory build(List<Class<?>> classes) throws JAXBException
JAXBContextFactory
instance. Pre-loads context cache with
given classesclasses
- JAXBException
- if provided classes can't be used for JAXBContext generation most
likely due to missing JAXB annotationsCopyright © 2012–2021 OpenFeign. All rights reserved.