Package javax.ws.rs.core
Class Link.JaxbAdapter
- Enclosing class:
- 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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConvert aLink
into aLink.JaxbLink
.Convert aLink.JaxbLink
into aLink
.
-
Constructor Details
-
JaxbAdapter
public JaxbAdapter()
-
-
Method Details
-
unmarshal
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
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
.
-