public class DurationAdapter extends XmlAdapter<java.lang.String,Duration>
Constructor and Description |
---|
DurationAdapter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
marshal(Duration v)
Convert a bound type to a value type.
|
Duration |
unmarshal(java.lang.String v)
Convert a value type to a bound type.
|
public Duration unmarshal(java.lang.String v) throws java.lang.Exception
XmlAdapter
unmarshal
in class XmlAdapter<java.lang.String,Duration>
v
- The value to be converted. Can be null.java.lang.Exception
- if there's an error during the conversion. The caller is responsible for
reporting the error to the user through ValidationEventHandler
.public java.lang.String marshal(Duration v) throws java.lang.Exception
XmlAdapter
marshal
in class XmlAdapter<java.lang.String,Duration>
v
- The value to be convereted. Can be null.java.lang.Exception
- if there's an error during the conversion. The caller is responsible for
reporting the error to the user through ValidationEventHandler
.