Class YearAsTextXmlAdapter


  • public class YearAsTextXmlAdapter
    extends XmlAdapter<java.lang.String,​java.time.Year>
    XmlAdapter mapping JSR-310 Year to ISO proleptic year string

    Year string interpretation details:

    • Year.parse(CharSequence)
    • Year.toString()

    This adapter is suitable for xsd:gYear types.

    See Also:
    XmlAdapter, Year
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String marshal​(java.time.Year year)  
      java.time.Year unmarshal​(java.lang.String isoYearString)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • YearAsTextXmlAdapter

        public YearAsTextXmlAdapter()
    • Method Detail

      • unmarshal

        public java.time.Year unmarshal​(java.lang.String isoYearString)
        Specified by:
        unmarshal in class XmlAdapter<java.lang.String,​java.time.Year>
      • marshal

        public java.lang.String marshal​(java.time.Year year)
        Specified by:
        marshal in class XmlAdapter<java.lang.String,​java.time.Year>