Class MonthXmlAdapter


  • public class MonthXmlAdapter
    extends XmlAdapter<java.lang.Integer,​java.time.Month>
    XmlAdapter mapping JSR-310 Month to ISO proleptic month number

    Month number interpretation details:

    • Month.of(int)
    • Month.getValue()

    Be aware that using this adapter will yield null when unmarshalling xsd:gMonth types. Use MonthAsTextXmlAdapter instead.

    See Also:
    XmlAdapter, Month
    • Constructor Summary

      Constructors 
      Constructor Description
      MonthXmlAdapter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Integer marshal​(java.time.Month value)  
      java.time.Month unmarshal​(java.lang.Integer intValue)  
      • Methods inherited from class java.lang.Object

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

      • MonthXmlAdapter

        public MonthXmlAdapter()
    • Method Detail

      • unmarshal

        public java.time.Month unmarshal​(java.lang.Integer intValue)
        Specified by:
        unmarshal in class XmlAdapter<java.lang.Integer,​java.time.Month>
      • marshal

        public java.lang.Integer marshal​(java.time.Month value)
        Specified by:
        marshal in class XmlAdapter<java.lang.Integer,​java.time.Month>