javax.ws.rs.core
Class Link.JaxbAdapter
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<Link.JaxbLink,Link>
javax.ws.rs.core.Link.JaxbAdapter
- Enclosing class:
- Link
public static class Link.JaxbAdapter
- extends XmlAdapter<Link.JaxbLink,Link>
An implementation of JAXB 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;
}
...
}
- Since:
- 2.0
- See Also:
Link.JaxbLink
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Link.JaxbAdapter
public Link.JaxbAdapter()
unmarshal
public Link unmarshal(Link.JaxbLink v)
- Convert a
Link.JaxbLink
into a Link
.
- Specified by:
unmarshal
in class XmlAdapter<Link.JaxbLink,Link>
- Parameters:
v
- instance of type Link.JaxbLink
.
- Returns:
- mapped instance of type
Link.JaxbLink
marshal
public Link.JaxbLink marshal(Link v)
- Convert a
Link
into a Link.JaxbLink
.
- Specified by:
marshal
in class XmlAdapter<Link.JaxbLink,Link>
- Parameters:
v
- instance of type Link
.
- Returns:
- mapped instance of type
Link.JaxbLink
.
Copyright © 2013. All Rights Reserved.