public static class Link.JaxbAdapter extends jakarta.xml.bind.annotation.adapters.XmlAdapter<Link.JaxbLink,Link>
XmlAdapter
that maps the JAX-RS
Link
type to a value that can be marshalled and unmarshalled by JAXB. The following example
shows how to use this adapter on a JAXB bean class:
@XmlRootElement public class MyModel { private Link link; @XmlElement(name="link") @XmlJavaTypeAdapter(JaxbAdapter.class) public Link getLink() { return link; } ... }Note that usage of this class requires the Jakarta XML Binding API and an implementation. The Jakarta RESTful Web Services implementation is not required to provide these dependencies.
Link.JaxbLink
Constructor and Description |
---|
JaxbAdapter() |
Modifier and Type | Method and Description |
---|---|
Link.JaxbLink |
marshal(Link v)
Convert a
Link into a Link.JaxbLink . |
Link |
unmarshal(Link.JaxbLink v)
Convert a
Link.JaxbLink into a Link . |
public Link unmarshal(Link.JaxbLink v)
Link.JaxbLink
into a Link
.unmarshal
in class jakarta.xml.bind.annotation.adapters.XmlAdapter<Link.JaxbLink,Link>
v
- instance of type Link.JaxbLink
.Link.JaxbLink
public Link.JaxbLink marshal(Link v)
Link
into a Link.JaxbLink
.marshal
in class jakarta.xml.bind.annotation.adapters.XmlAdapter<Link.JaxbLink,Link>
v
- instance of type Link
.Link.JaxbLink
.Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.