io.github.threetenjaxb.core.InstantXmlAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of threeten-jaxb-core Show documentation
Show all versions of threeten-jaxb-core Show documentation
JAXB adapters for Java 8 Date and Time API (JSR-310) types
The newest version!
package io.github.threetenjaxb.core;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
/**
* {@code XmlAdapter} mapping JSR-310 {@code Instant} to ISO-8601 string
*
* String format details: {@link java.time.format.DateTimeFormatter#ISO_INSTANT}
*
* @see jakarta.xml.bind.annotation.adapters.XmlAdapter
* @see java.time.Instant
*/
public class InstantXmlAdapter extends TemporalAccessorXmlAdapter {
public InstantXmlAdapter() {
super(DateTimeFormatter.ISO_INSTANT, Instant::from);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy