// 先判断是不是collection,在判断是不是java自带对象,之后就是我们自己的对象了
if (ExcelPublicUtil.isNotUserExcelUserThis(field, targetId)) {
continue;
}
if (ExcelPublicUtil.isCollection(field.getType())) {
ExcelCollection excel = field
.getAnnotation(ExcelCollection.class);
ParameterizedType pt = (ParameterizedType) field
.getGenericType();
Class<?> clz = (Class<?>) pt.getActualTypeArguments()[0];
List<ExcelExportEntity> list = new ArrayList<ExcelExportEntity>();
getExcelFieldList(targetId,
ExcelPublicUtil.getClassFields(clz), clz, list, null);
excelEntity = new ExcelExportEntity();
excelEntity.setName(getExcelName(excel.exportName(), targetId));
excelEntity
.setOrderNum(getCellOrder(excel.orderNum(), targetId));
excelEntity.setGetMethod(ExcelPublicUtil.getMethod(
field.getName(), pojoClass));
excelEntity.setList(list);
excelParams.add(excelEntity);
} else if (ExcelPublicUtil.isJavaClass(field)) {
Excel excel = field.getAnnotation(Excel.class);
excelEntity = new ExcelExportEntity();
excelEntity.setType(excel.exportType());
getExcelField(targetId, field, excelEntity, excel, pojoClass);
if (getMethods != null) {
List<Method> newMethods = new ArrayList<Method>();
newMethods.addAll(getMethods);
newMethods.add(excelEntity.getGetMethod());