//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.yx.AIHome.AIHome_common.base.utils;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.springframework.beans.BeanUtils;
public class ConvertUtils {
public ConvertUtils() {
}
public static <T> T convert(Object src, Class<T> destClass) {
try {
T result = destClass.newInstance();
BeanUtils.copyProperties(src, result);
return result;
} catch (Exception var3) {
throw new RuntimeException(var3.getMessage(), var3);
}
}
public static <T> List<T> convert(List<?> srcList, Class<T> destClass) {
List<T> resultList = new ArrayList();
Iterator var3 = srcList.iterator();
while(var3.hasNext()) {
Object src = var3.next();
T dest = convert(src, destClass);
resultList.add(dest);
}
return resultList;
}
}