Package com.sun.xml.bind.api
Class Bridge<T>
- java.lang.Object
-
- com.sun.xml.bind.api.Bridge<T>
-
public abstract class Bridge<T> extends java.lang.ObjectMini-marshaller/unmarshaller that is specialized for a particular element name and a type.Instances of this class is stateless and multi-thread safe. They are reentrant.
All the marshal operation generates fragments.
Subject to change without notice.
- Since:
- JAXB 2.0 EA1
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description protected JAXBContextImplcontext
-
Constructor Summary
Constructors Modifier Constructor Description protectedBridge(JAXBContextImpl context)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description JAXBRIContextgetContext()Gets theJAXBRIContextto which this object belongs.abstract TypeReferencegetTypeReference()Gets theTypeReferencefrom which this bridge was created.voidmarshal(BridgeContext context, T object, java.io.OutputStream output, javax.xml.namespace.NamespaceContext nsContext)voidmarshal(BridgeContext context, T object, javax.xml.stream.XMLStreamWriter output)voidmarshal(BridgeContext context, T object, javax.xml.transform.Result result)voidmarshal(BridgeContext context, T object, org.w3c.dom.Node output)voidmarshal(BridgeContext context, T object, org.xml.sax.ContentHandler contentHandler)abstract voidmarshal(javax.xml.bind.Marshaller m, T object, java.io.OutputStream output, javax.xml.namespace.NamespaceContext nsContext)abstract voidmarshal(javax.xml.bind.Marshaller m, T object, javax.xml.stream.XMLStreamWriter output)abstract voidmarshal(javax.xml.bind.Marshaller m, T object, javax.xml.transform.Result result)abstract voidmarshal(javax.xml.bind.Marshaller m, T object, org.w3c.dom.Node output)abstract voidmarshal(javax.xml.bind.Marshaller m, T object, org.xml.sax.ContentHandler contentHandler)voidmarshal(T object, java.io.OutputStream output, javax.xml.namespace.NamespaceContext nsContext)Marshals the specified type object with the implicit element name associated with this instance ofBridge.voidmarshal(T object, java.io.OutputStream output, javax.xml.namespace.NamespaceContext nsContext, javax.xml.bind.attachment.AttachmentMarshaller am)voidmarshal(T object, javax.xml.stream.XMLStreamWriter output)voidmarshal(T object, javax.xml.stream.XMLStreamWriter output, javax.xml.bind.attachment.AttachmentMarshaller am)voidmarshal(T object, javax.xml.transform.Result result)voidmarshal(T object, org.w3c.dom.Node output)voidmarshal(T object, org.xml.sax.ContentHandler contentHandler)voidmarshal(T object, org.xml.sax.ContentHandler contentHandler, javax.xml.bind.attachment.AttachmentMarshaller am)Tunmarshal(BridgeContext context, java.io.InputStream in)Tunmarshal(BridgeContext context, javax.xml.stream.XMLStreamReader in)Tunmarshal(BridgeContext context, javax.xml.transform.Source in)Tunmarshal(BridgeContext context, org.w3c.dom.Node n)Tunmarshal(java.io.InputStream in)Unmarshals the specified type object.abstract Tunmarshal(javax.xml.bind.Unmarshaller u, java.io.InputStream in)abstract Tunmarshal(javax.xml.bind.Unmarshaller u, javax.xml.stream.XMLStreamReader in)abstract Tunmarshal(javax.xml.bind.Unmarshaller u, javax.xml.transform.Source in)abstract Tunmarshal(javax.xml.bind.Unmarshaller context, org.w3c.dom.Node n)Tunmarshal(javax.xml.stream.XMLStreamReader in)Unmarshals the specified type object.Tunmarshal(javax.xml.stream.XMLStreamReader in, javax.xml.bind.attachment.AttachmentUnmarshaller au)Tunmarshal(javax.xml.transform.Source in)Unmarshals the specified type object.Tunmarshal(javax.xml.transform.Source in, javax.xml.bind.attachment.AttachmentUnmarshaller au)Tunmarshal(org.w3c.dom.Node n)Unmarshals the specified type object.Tunmarshal(org.w3c.dom.Node n, javax.xml.bind.attachment.AttachmentUnmarshaller au)
-
-
-
Field Detail
-
context
protected final JAXBContextImpl context
-
-
Constructor Detail
-
Bridge
protected Bridge(JAXBContextImpl context)
-
-
Method Detail
-
getContext
@NotNull public JAXBRIContext getContext()
Gets theJAXBRIContextto which this object belongs.- Since:
- 2.1
-
marshal
public final void marshal(T object, javax.xml.stream.XMLStreamWriter output) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException- if there was an error while marshalling.- Since:
- 2.0 EA1
-
marshal
public final void marshal(T object, javax.xml.stream.XMLStreamWriter output, javax.xml.bind.attachment.AttachmentMarshaller am) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
marshal
public final void marshal(@NotNull BridgeContext context, T object, javax.xml.stream.XMLStreamWriter output) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
marshal
public abstract void marshal(@NotNull javax.xml.bind.Marshaller m, T object, javax.xml.stream.XMLStreamWriter output) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
marshal
public void marshal(T object, java.io.OutputStream output, javax.xml.namespace.NamespaceContext nsContext) throws javax.xml.bind.JAXBException
Marshals the specified type object with the implicit element name associated with this instance ofBridge.- Parameters:
nsContext- if this marshalling is done to marshal a subelement, thisNamespaceContextrepresents in-scope namespace bindings available for that element. Can be null, in which case JAXB assumes no in-scope namespaces.- Throws:
javax.xml.bind.JAXBException- if there was an error while marshalling.- Since:
- 2.0 EA1
-
marshal
public void marshal(T object, java.io.OutputStream output, javax.xml.namespace.NamespaceContext nsContext, javax.xml.bind.attachment.AttachmentMarshaller am) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException- Since:
- 2.0.2
-
marshal
public final void marshal(@NotNull BridgeContext context, T object, java.io.OutputStream output, javax.xml.namespace.NamespaceContext nsContext) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
marshal
public abstract void marshal(@NotNull javax.xml.bind.Marshaller m, T object, java.io.OutputStream output, javax.xml.namespace.NamespaceContext nsContext) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
marshal
public final void marshal(T object, org.w3c.dom.Node output) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
marshal
public final void marshal(@NotNull BridgeContext context, T object, org.w3c.dom.Node output) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
marshal
public abstract void marshal(@NotNull javax.xml.bind.Marshaller m, T object, org.w3c.dom.Node output) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
marshal
public final void marshal(T object, org.xml.sax.ContentHandler contentHandler) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException- Since:
- 2.0 EA4
-
marshal
public final void marshal(T object, org.xml.sax.ContentHandler contentHandler, javax.xml.bind.attachment.AttachmentMarshaller am) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException- Since:
- 2.0.2
-
marshal
public final void marshal(@NotNull BridgeContext context, T object, org.xml.sax.ContentHandler contentHandler) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
marshal
public abstract void marshal(@NotNull javax.xml.bind.Marshaller m, T object, org.xml.sax.ContentHandler contentHandler) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
marshal
public final void marshal(T object, javax.xml.transform.Result result) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException- Since:
- 2.0 EA4
-
marshal
public final void marshal(@NotNull BridgeContext context, T object, javax.xml.transform.Result result) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
marshal
public abstract void marshal(@NotNull javax.xml.bind.Marshaller m, T object, javax.xml.transform.Result result) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
unmarshal
@NotNull public final T unmarshal(@NotNull javax.xml.stream.XMLStreamReader in) throws javax.xml.bind.JAXBException
Unmarshals the specified type object.- Parameters:
in- the parser must be pointing at a start tag that encloses the XML type that thisBridgeis instanciated for.- Returns:
- never null.
- Throws:
javax.xml.bind.JAXBException- if there was an error while unmarshalling.- Since:
- 2.0 EA1
-
unmarshal
@NotNull public final T unmarshal(@NotNull javax.xml.stream.XMLStreamReader in, @Nullable javax.xml.bind.attachment.AttachmentUnmarshaller au) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException- Since:
- 2.0.3
-
unmarshal
@NotNull public final T unmarshal(@NotNull BridgeContext context, @NotNull javax.xml.stream.XMLStreamReader in) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
unmarshal
@NotNull public abstract T unmarshal(@NotNull javax.xml.bind.Unmarshaller u, @NotNull javax.xml.stream.XMLStreamReader in) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
unmarshal
@NotNull public final T unmarshal(@NotNull javax.xml.transform.Source in) throws javax.xml.bind.JAXBException
Unmarshals the specified type object.- Parameters:
in- the parser must be pointing at a start tag that encloses the XML type that thisBridgeis instanciated for.- Returns:
- never null.
- Throws:
javax.xml.bind.JAXBException- if there was an error while unmarshalling.- Since:
- 2.0 EA1
-
unmarshal
@NotNull public final T unmarshal(@NotNull javax.xml.transform.Source in, @Nullable javax.xml.bind.attachment.AttachmentUnmarshaller au) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException- Since:
- 2.0.3
-
unmarshal
@NotNull public final T unmarshal(@NotNull BridgeContext context, @NotNull javax.xml.transform.Source in) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
unmarshal
@NotNull public abstract T unmarshal(@NotNull javax.xml.bind.Unmarshaller u, @NotNull javax.xml.transform.Source in) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
unmarshal
@NotNull public final T unmarshal(@NotNull java.io.InputStream in) throws javax.xml.bind.JAXBException
Unmarshals the specified type object.- Parameters:
in- the parser must be pointing at a start tag that encloses the XML type that thisBridgeis instanciated for.- Returns:
- never null.
- Throws:
javax.xml.bind.JAXBException- if there was an error while unmarshalling.- Since:
- 2.0 EA1
-
unmarshal
@NotNull public final T unmarshal(@NotNull BridgeContext context, @NotNull java.io.InputStream in) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
unmarshal
@NotNull public abstract T unmarshal(@NotNull javax.xml.bind.Unmarshaller u, @NotNull java.io.InputStream in) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
unmarshal
@NotNull public final T unmarshal(@NotNull org.w3c.dom.Node n) throws javax.xml.bind.JAXBException
Unmarshals the specified type object.- Parameters:
n- Node to be unmarshalled.- Returns:
- never null.
- Throws:
javax.xml.bind.JAXBException- if there was an error while unmarshalling.- Since:
- 2.0 FCS
-
unmarshal
@NotNull public final T unmarshal(@NotNull org.w3c.dom.Node n, @Nullable javax.xml.bind.attachment.AttachmentUnmarshaller au) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException- Since:
- 2.0.3
-
unmarshal
@NotNull public final T unmarshal(@NotNull BridgeContext context, @NotNull org.w3c.dom.Node n) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
unmarshal
@NotNull public abstract T unmarshal(@NotNull javax.xml.bind.Unmarshaller context, @NotNull org.w3c.dom.Node n) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
getTypeReference
public abstract TypeReference getTypeReference()
Gets theTypeReferencefrom which this bridge was created.
-
-