private static <V> V deepCopyObject(V original) {
        if (String.class.isAssignableFrom(original.getClass())
            || Number.class.isAssignableFrom(original.getClass())
            || Boolean.class.isAssignableFrom(original.getClass())
            || Enum.class.isAssignableFrom(original.getClass())) {
            return original;
        } else if (List.class.isAssignableFrom(original.getClass())) {
            @SuppressWarnings("unchecked")
            final V result = (V) deepCopyList((List<?>) original);
            return result;
        } else if (Map.class.isAssignableFrom(original.getClass())) {
            @SuppressWarnings("unchecked")
            final V result = (V) deepCopyMap((Map<?, ?>) original);
            return result;
        } else {
            throw new UnsupportedOperationException(
                "Can't deep copy unknown type '" + original.getClass() + "'."
            );
        }
    }
Casts the specified object to a {@code List<Map<String, Object>>}.
<p>
Careful! This method does not cause any unchecked warnings, so it might
be unsafe to use.

@param obj  the object to cast
@return     the typed list
runtime-parent/runtime-config/src/main/java/com/speedment/runtime/config/util/DocumentUtil.java