Package 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 JAXBXmlAdapter
that maps theLink
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
-
-
Constructor Summary
Constructors Constructor Description JaxbAdapter()
-
Method Summary
Modifier and Type Method Description Link.JaxbLink
marshal(Link v)
Convert aLink
into aLink.JaxbLink
.Link
unmarshal(Link.JaxbLink v)
Convert aLink.JaxbLink
into aLink
.
-
-
-
Method Detail
-
unmarshal
public Link unmarshal(Link.JaxbLink v)
Convert aLink.JaxbLink
into aLink
.- Specified by:
unmarshal
in classXmlAdapter<Link.JaxbLink,Link>
- Parameters:
v
- instance of typeLink.JaxbLink
.- Returns:
- mapped instance of type
Link.JaxbLink
-
marshal
public Link.JaxbLink marshal(Link v)
Convert aLink
into aLink.JaxbLink
.- Specified by:
marshal
in classXmlAdapter<Link.JaxbLink,Link>
- Parameters:
v
- instance of typeLink
.- Returns:
- mapped instance of type
Link.JaxbLink
.
-
-