private static <T, K> List<K> copyObject(List<T> list, Class<K> clazz) {
        List<K> newList = new ArrayList<>();
        list.forEach(item -> {
            try {
                K value = JsonUtils.parseObject(JsonUtils.toJsonString(item), clazz);
                assert value != null;
                parseStatus(value);
                newList.add(value);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        });
        return newList;
    }
Copy the objects in the list, converting them to the specified type.
inlong-manager/manager-client-tools/src/main/java/org/apache/inlong/manager/client/cli/util/PrintUtils.java