public static <T> Object convertListToArray(List<T> list, Class<T> destEntryType) {

        Object outArray = Array.newInstance(destEntryType, list.size());
        int count = 0;
        int size = list.size();
        for (int i = 0; i < size; i++) {
            Object element = list.get(i);
            Array.set(outArray, count, element);
            count++;
        }

        if (destEntryType.isPrimitive()) {
            return outArray;
        } else {
            return outArray;
        }
    }
Internal class that contains various Collection utilities specific to Dozer requirements. Not intended for direct use
by application code.
core/src/main/java/com/github/dozermapper/core/util/CollectionUtils.java