public Object convert(Class destClass, Object srcObj) {
        Class srcClass = srcObj.getClass();
        if (hasDateFormat()) {
            if (Date.class.isAssignableFrom(srcClass)) {
                return dateFormatContainer.getDateFormat().format((Date)srcObj);
            }
            if (Calendar.class.isAssignableFrom(srcClass)) {
                return dateFormatContainer.getDateFormat().format(((Calendar)srcObj).getTime());
            } else if (TemporalAccessor.class.isAssignableFrom(srcClass)) {
                return dateFormatContainer.getDateTimeFormatter().format((TemporalAccessor)srcObj);
            } else {
                return srcObj.toString();
            }
        } else {
            return srcObj.toString();
        }
    }
Internal class for converting Supported Data Types to String. Uses date formatter for Date and Calendar source
objects. Calls toString() on the source object for all other types. Only intended for internal use.
core/src/main/java/com/github/dozermapper/core/converters/StringConverter.java