@Override
    @SuppressWarnings("unchecked")
    public Object convert(Class destClass, Object srcObject) {
        Class<?> srcObjectClass = srcObject.getClass();
        try {
            if (TemporalAccessor.class.isAssignableFrom(srcObjectClass)) {
                Method method = destClass.getDeclaredMethod("from", TemporalAccessor.class);
                return method.invoke(null, (TemporalAccessor)srcObject);
            } else if (String.class.isAssignableFrom(srcObjectClass) && formatter != null) {
                Method method = destClass.getDeclaredMethod("parse", CharSequence.class, DateTimeFormatter.class);
                return method.invoke(null, srcObject, formatter);
            } else {
                throw new ConversionException(String.format("Unsupported source object type: %s", srcObjectClass), null);
            }
        } catch (NoSuchMethodException | IllegalAccessException e) {
            throw new ConversionException(
                    String.format("Failed to create %s from %s", destClass.getSimpleName(), srcObject.getClass().getSimpleName()), e);
        } catch (InvocationTargetException e) {
            throw new ConversionException(
                    String.format("Failed to create %s from %s", destClass.getSimpleName(), srcObject.getClass().getSimpleName()), e.getTargetException());
        }
    }
Base converter to Java 8 date and time types.
<pre>
Supported basic conversions:
 Any child of TemporalAccessor &#45;&gt; LocalDateTime
 String &#45;&gt; LocalDateTime
</pre>
core/src/main/java/com/github/dozermapper/core/converters/AbstractJava8DateTimeConverter.java