com.migesok.jaxb.adapter.javatime.OffsetTimeXmlAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaxb-java-time-adapters Show documentation
Show all versions of jaxb-java-time-adapters Show documentation
JAXB adapters for Java 8 Date and Time API (JSR-310) types
The newest version!
package com.migesok.jaxb.adapter.javatime;
import java.time.OffsetTime;
import java.time.format.DateTimeFormatter;
/**
* {@code XmlAdapter} mapping JSR-310 {@code OffsetTime} to ISO-8601 string
*
* String format details: {@link java.time.format.DateTimeFormatter#ISO_OFFSET_TIME}
*
* @see javax.xml.bind.annotation.adapters.XmlAdapter
* @see java.time.OffsetTime
*/
public class OffsetTimeXmlAdapter extends TemporalAccessorXmlAdapter {
public OffsetTimeXmlAdapter() {
super(DateTimeFormatter.ISO_OFFSET_TIME, OffsetTime::from);
}
}