Code example for DatatypeFactory

Methods: newXMLGregorianCalendar

0
    if (destinationType == Date.class)
      return toDate(calendar);
    if (destinationType == Calendar.class)
      return calendar;
    if (destinationType == XMLGregorianCalendar.class)
      return dataTypeFactory.newXMLGregorianCalendar((GregorianCalendar) calendar);
    if (destinationType == java.sql.Date.class)
      return toSqlDate(calendar);
    if (destinationType == Time.class)
      return toTime(calendar);
    if (destinationType == Timestamp.class)
      return toTimestamp(calendar);
 
    fail(); 
    return null; 
  } 
} 
Connect your IDE to all the code out there  Get Codota for Java