Class DateAdapter.ZonedDateTimeAdapter

java.lang.Object
cloud.opencode.base.xml.bind.adapter.DateAdapter.ZonedDateTimeAdapter
All Implemented Interfaces:
XmlAdapter<String, ZonedDateTime>
Enclosing class:
DateAdapter

public static class DateAdapter.ZonedDateTimeAdapter extends Object implements XmlAdapter<String, ZonedDateTime>
Adapter for ZonedDateTime. ZonedDateTime 适配器。
Since:
JDK 25, opencode-base-xml V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • ZonedDateTimeAdapter

      public ZonedDateTimeAdapter()
    • ZonedDateTimeAdapter

      public ZonedDateTimeAdapter(DateTimeFormatter formatter)
  • Method Details

    • unmarshal

      public ZonedDateTime unmarshal(String value)
      Description copied from interface: XmlAdapter
      Converts an XML value to a Java object. 将 XML 值转换为 Java 对象。
      Specified by:
      unmarshal in interface XmlAdapter<String, ZonedDateTime>
      Parameters:
      value - the XML value | XML 值
      Returns:
      the Java object | Java 对象
    • marshal

      public String marshal(ZonedDateTime value)
      Description copied from interface: XmlAdapter
      Converts a Java object to XML value. 将 Java 对象转换为 XML 值。
      Specified by:
      marshal in interface XmlAdapter<String, ZonedDateTime>
      Parameters:
      value - the Java object | Java 对象
      Returns:
      the XML value | XML 值