@SuppressWarnings("unchecked")
    public static <T> List<T> toList(Iterator<T> it, Class<? extends List> listType) {
        List<T> list = (List<T>) KlassUtils.getInstanceOf(listType, new Object[] {});
        if (it == null) {
            return list;
        }
        while (it.hasNext()) {
            list.add(it.next());
        }
        return list;
    }