public static class MarshalParameters.Builder extends Object implements Builder<MarshalParameters>
Constructor and Description |
---|
Builder(Object object)
Creates this Builder using the supplied object and using default settings.
|
Modifier and Type | Method and Description |
---|---|
MarshalParameters |
build()
Builds the MarshalParameters object.
|
MarshalParameters.Builder |
escape(boolean escape)
Adds the escape option.
|
MarshalParameters.Builder |
jaxbContext(JAXBContext jaxbContext)
Adds the JAXB context used for marshalling.
|
MarshalParameters.Builder |
property(String propertyName,
Object propertyValue)
Adds a marshalling property.
|
public Builder(Object object)
object
- The object to marshal.public MarshalParameters.Builder jaxbContext(JAXBContext jaxbContext)
jaxbContext
- The JAXB context.public MarshalParameters.Builder escape(boolean escape)
escape
- True to escape, false to not escape the XML.public MarshalParameters.Builder property(String propertyName, Object propertyValue)
propertyName
- The name of the marshalling property.propertyValue
- The value of the marshalling property.NullPointerException
- When either the supplied propertyName or propertyValue is null.IllegalArgumentException
- When the supplied propertyName is empty.public MarshalParameters build()
build
in interface Builder<MarshalParameters>
Copyright © 2008–2018. All rights reserved.