refactor: 增强代码注释以提升可读性和维护性
This commit is contained in:
+11
@@ -46,10 +46,21 @@ public class DefaultExcelListener<T> extends AnalysisEventListener<T> implements
|
||||
*/
|
||||
private Boolean failFast = Boolean.TRUE;
|
||||
|
||||
/**
|
||||
* 构造 Excel 导入监听器。
|
||||
*
|
||||
* @param isValidate 是否执行 Validator 校验
|
||||
*/
|
||||
public DefaultExcelListener(boolean isValidate) {
|
||||
this.isValidate = isValidate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造 Excel 导入监听器。
|
||||
*
|
||||
* @param isValidate 是否执行 Validator 校验
|
||||
* @param failFast 发生异常时是否立即终止读取
|
||||
*/
|
||||
public DefaultExcelListener(boolean isValidate, boolean failFast) {
|
||||
this.isValidate = isValidate;
|
||||
this.failFast = failFast;
|
||||
|
||||
+5
@@ -65,6 +65,11 @@ public class ExcelDownHandler implements SheetWriteHandler {
|
||||
*/
|
||||
private int currentLinkedOptionsSheetIndex;
|
||||
|
||||
/**
|
||||
* 构造 Excel 下拉选处理器。
|
||||
*
|
||||
* @param options 外部指定的下拉选项
|
||||
*/
|
||||
public ExcelDownHandler(List<DropDownOptions> options) {
|
||||
this.dropDownOptions = options;
|
||||
this.currentOptionsColumnIndex = 0;
|
||||
|
||||
+5
@@ -40,6 +40,11 @@ public class DataWriteHandler implements SheetWriteHandler, CellWriteHandler {
|
||||
private final Map<String, Short> headColumnMap;
|
||||
|
||||
|
||||
/**
|
||||
* 构造批注与必填样式处理器。
|
||||
*
|
||||
* @param clazz 表头类型
|
||||
*/
|
||||
public DataWriteHandler(Class<?> clazz) {
|
||||
notationMap = getNotationMap(clazz);
|
||||
headColumnMap = getRequiredMap(clazz);
|
||||
|
||||
Reference in New Issue
Block a user