public class JAXBmar extends Object implements PoolableObjectCreator
| Constructor and Description |
|---|
JAXBmar(boolean isFragment,
Class<?>... classes)
Constructs a JAXBmar object bound to the supplied classes and specified
fragment handling.
|
JAXBmar(Class<?>... classes)
Constructs a JAXBmar object bound to the supplied classes.
|
JAXBmar(QName qname,
boolean isFragment,
Class<?>... classes)
Returns a JAXBmar (existing if available in the cache, otherwise new)
instance bound to the supplied classes, QName, and fragment handling.
|
JAXBmar(QName qname,
Class<?>... classes)
Constructs a JAXBmar object bound to the supplied classes and QName.
|
JAXBmar(QName qname,
String encoding,
Class<?>... classes)
Constructs a JAXBmar object bound to the supplied classes, QName, and
encoding.
|
JAXBmar(RuntimeTIG tig,
Class<?>... classes)
Deprecated.
|
JAXBmar(RuntimeTIG tig,
QName qname)
Constructs a JAXBmar object bound to the class name associated with the
supplied QName in the supplied RuntimeTIG.
|
JAXBmar(String encoding,
Class<?>... classes)
Constructs a JAXBmar object bound to the supplied classes and specified
encoding.
|
| Modifier and Type | Method and Description |
|---|---|
Marshaller |
createPoolableObject()
Creates and returns a new instance of the Object type being pooled.
|
Marshaller |
get()
Deprecated.
|
static String |
getKey(String encoding,
boolean fragment,
QName qname,
Class<?>... classes)
Generates a key name based on the supplied inputs for storing this object
in the static HashMap for reuse.
|
Class<?> |
getMarshalClass()
Returns the class bound to the JAXBmar.
|
Map<String,String> |
getMetadata()
Returns a key/value map of meta-data about the Object type being pooled.
|
static JAXBmar |
instance(boolean isFragment,
Class<?>... classes)
Returns a JAXBmar (existing if available in the cache, otherwise new)
instance bound to the supplied classes and specified fragment handling.
|
static JAXBmar |
instance(Class<?>... classes)
Returns a JAXBmar (existing if available in the cache, otherwise new)
instance bound to the supplied classes.
|
static JAXBmar |
instance(QName qname,
boolean isFragment,
Class<?>... classes)
Returns a JAXBmar (existing if available in the cache, otherwise new)
instance bound to the supplied classes, QName, and fragment handling.
|
static JAXBmar |
instance(QName qname,
Class<?>... classes)
Returns a JAXBmar (existing if available in the cache, otherwise new)
instance bound to the supplied classes and QName.
|
static JAXBmar |
instance(QName qname,
String encoding,
Class<?>... classes)
Returns a JAXBmar (existing if available in the cache, otherwise new)
instance bound to the supplied classes, QName, and encoding.
|
static JAXBmar |
instance(RuntimeTIG tig,
Class<?>... classes)
Deprecated.
|
static JAXBmar |
instance(RuntimeTIG tig,
QName qname)
Returns a JAXBmar (existing if available in the cache, otherwise new)
instance bound to the class name associated with the supplied QName in
the supplied RuntimeTIG.
|
static JAXBmar |
instance(String encoding,
Class<?>... classes)
Returns a JAXBmar (existing if available in the cache, otherwise new)
instance bound to the supplied classes and specified encoding.
|
<O> O |
marshal(O o,
Document doc) |
<O> O |
marshal(O o,
Document doc,
Class<O> theClass) |
<O> O |
marshal(O o,
OutputStream os) |
<O> O |
marshal(O o,
OutputStream os,
Class<O> theClass) |
<O> O |
marshal(O o,
Writer writer) |
<O> O |
marshal(O o,
Writer writer,
Class<O> theClass) |
<O> String |
stringify(O o) |
public JAXBmar(Class<?>... classes)
classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.public JAXBmar(boolean isFragment,
Class<?>... classes)
isFragment - A boolean flag indicating whether or not to include the XML
fragment in the marshalled XML data.classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.public JAXBmar(String encoding, Class<?>... classes)
encoding - The output encoding in the marshalled XML data.classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.public JAXBmar(QName qname, Class<?>... classes)
qname - The QName used to marshal the XML data.classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.public JAXBmar(QName qname, String encoding, Class<?>... classes)
qname - The QName used to marshal the XML data.encoding - The output encoding in the marshalled XML data.classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.public JAXBmar(QName qname, boolean isFragment, Class<?>... classes)
qname - The QName used to marshal the XML data.isFragment - A boolean flag indicating whether or not to include the XML
fragment in the marshalled XML data.classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.@Deprecated public JAXBmar(RuntimeTIG tig, Class<?>... classes)
tig - The RuntimeTIG used to lookup the class name from the supplied
QName.classes - The classes used to lookup the QName in the supplied
RuntimeTIG.
Note: This method is not guaranteed to be safe and is
therefore not recommended for future use.public JAXBmar(RuntimeTIG tig, QName qname)
tig - The RuntimeTIG used to lookup the class name from the supplied
QName.qname - The QName used to lookup the class name in the supplied
RuntimeTIG.@Deprecated public Marshaller get()
public static String getKey(String encoding, boolean fragment, QName qname, Class<?>... classes)
encoding - The output encoding in the marshalled XML data.fragment - Boolean flag indicating whether or not to include the XML
fragment in the marshalled XML data.qname - The QName used to marshal the XML data.classes - An array of classes bound to the JAXBContext.public static JAXBmar instance(Class<?>... classes)
classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.public static JAXBmar instance(boolean isFragment, Class<?>... classes)
isFragment - A boolean flag indicating whether or not to include the XML
fragment in the marshalled XML data.classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.public static JAXBmar instance(String encoding, Class<?>... classes)
encoding - The output encoding in the marshalled XML data.classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.public static JAXBmar instance(QName qname, Class<?>... classes)
qname - The QName used to marshal the XML data.classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.public static JAXBmar instance(QName qname, String encoding, Class<?>... classes)
qname - The QName used to marshal the XML data.encoding - The output encoding in the marshalled XML data.classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.public static JAXBmar instance(QName qname, boolean isFragment, Class<?>... classes)
qname - The QName used to marshal the XML data.isFragment - A boolean flag indicating whether or not to include the XML
fragment in the marshalled XML data.classes - The classes bound to the JAXBContext for the desired JAXBmar
instance.@Deprecated public static JAXBmar instance(RuntimeTIG tig, Class<?>... classes)
tig - The RuntimeTIG used to lookup the class name from the supplied
QName.classes - The classes used to lookup the QName in the supplied
RuntimeTIG.public static JAXBmar instance(RuntimeTIG tig, QName qname)
tig - The RuntimeTIG used to lookup the class name from the supplied
QName.qname - The QName used to lookup the class name in the supplied
RuntimeTIG.public <O> O marshal(O o,
Writer writer)
throws JAXBException
JAXBExceptionpublic <O> O marshal(O o,
OutputStream os)
throws JAXBException
JAXBExceptionpublic <O> O marshal(O o,
Document doc)
throws JAXBException
JAXBExceptionpublic <O> O marshal(O o,
Writer writer,
Class<O> theClass)
throws JAXBException
JAXBExceptionpublic <O> O marshal(O o,
OutputStream os,
Class<O> theClass)
throws JAXBException
JAXBExceptionpublic <O> O marshal(O o,
Document doc,
Class<O> theClass)
throws JAXBException
JAXBExceptionpublic <O> String stringify(O o) throws JAXBException
JAXBExceptionpublic Class<?> getMarshalClass()
public Marshaller createPoolableObject()
PoolableObjectCreatorcreatePoolableObject in interface PoolableObjectCreatorpublic Map<String,String> getMetadata()
PoolableObjectCreatorgetMetadata in interface PoolableObjectCreatorCopyright © 2017 Pivotal Software, Inc.. All rights reserved.