import org.apache.poi.ss.usermodel.Sheet; //导入方法依赖的package包/类
public static T convertWithConstructor(Map sheetMap, Class clazz, boolean hasHeader) throws IllegalAccessException, InstantiationException, InvocationTargetException {
// T object = (T) UnsafeUtil.getUnsafe().allocateInstance(clazz);
T object = clazz.newInstance(); //可能没有无参构造方法
Field[] fields = clazz.getDeclaredFields();
for (Field field : fields) {
if(field.isAnnotationPresent(ExcelSheetField.class)){
ExcelSheetField annotation = field.getAnnotation(ExcelSheetField.class);
Sheet sheet = sheetMap.get(annotation.name());
if(sheet == null) continue;
Iterator iterator = sheet.iterator();
Class type = field.getType();
boolean isList = type.isAssignableFrom(List.class);
if(isList){
type = TypeUtil