public final class ListenerChain extends Object
| 构造器和说明 |
|---|
ListenerChain() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addReadListener(Map<Class<? extends ExcelReadListener>,List<ExcelReadListener>> readListenersCache,
ExcelReadListener readListener)
Add a read listener
|
static void |
addWriteListener(Map<Class<? extends ExcelWriteListener>,List<ExcelWriteListener>> writeListenerCache,
ExcelWriteListener listener,
org.apache.poi.ss.usermodel.Workbook workbook)
Add a write listener
|
static Object |
doAssignmentBefore(Map<Class<? extends ExcelWriteListener>,List<ExcelWriteListener>> excelListeners,
org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Row row,
org.apache.poi.ss.usermodel.Cell cell,
ExcelField excelField,
Field field,
int index,
int colIndex,
RowType rowType,
Object value)
Execute write cell listener
|
static void |
doCompleteCell(Map<Class<? extends ExcelWriteListener>,List<ExcelWriteListener>> excelListeners,
org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Row row,
org.apache.poi.ss.usermodel.Cell cell,
ExcelField excelField,
Field field,
int index,
int colIndex,
RowType rowType)
Execute write cell listener
|
static void |
doCompleteRow(Map<Class<? extends ExcelWriteListener>,List<ExcelWriteListener>> excelListeners,
org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Row row,
Object obj,
int index,
RowType rowType)
Execute write row listener
|
static void |
doCompleteSheet(ExcelWriterContext context)
Execute write sheet listener
|
static void |
doCreateRowBefore(Map<Class<? extends ExcelWriteListener>,List<ExcelWriteListener>> excelListeners,
org.apache.poi.ss.usermodel.Sheet sheet,
int index,
RowType rowType)
Before you create a row
|
static <R> void |
doReadBefore(List<ExcelReadListener> listeners,
ExcelReaderContext<R> context)
Before you start reading the data
|
static Object |
doReadCell(List<ExcelReadListener> rowReadListeners,
Object cellValue,
Field field,
int rowIndex,
int colIndex,
RowType rowType)
Execute read row listener
|
static <R> boolean |
doReadEmpty(List<ExcelReadListener> emptyReadListeners,
R r,
Field field,
ExcelField excelField,
int rowIndex,
int colIndex)
Execute read empty listener
|
static <R> void |
doReadFinish(List<ExcelReadListener> rowReadListeners,
ExcelReaderContext<R> context)
Execute read row listener
|
static <R> boolean |
doReadRow(List<ExcelReadListener> rowReadListeners,
R r,
List<?> otherValues,
int rowIndex,
RowType rowType)
Execute read row listener
|
static <R> void |
doResultNotify(ExcelResultReadListener<R> resultReadListener,
List<R> data)
Execute result notify listener
|
static void |
doWorkbookFlushBefore(ExcelWriterContext context)
Execute write workbook listener
|
public static void doCompleteCell(Map<Class<? extends ExcelWriteListener>,List<ExcelWriteListener>> excelListeners, org.apache.poi.ss.usermodel.Sheet sheet, org.apache.poi.ss.usermodel.Row row, org.apache.poi.ss.usermodel.Cell cell, ExcelField excelField, Field field, int index, int colIndex, RowType rowType)
excelListeners - excelListenerssheet - Current sheetrow - Current rowcell - Current cellindex - Data indexing, depending on the row type, starts at 0colIndex - Current cell indexrowType - Current row typeexcelField - ExcelField annotation of current fieldfield - Current fieldpublic static Object doAssignmentBefore(Map<Class<? extends ExcelWriteListener>,List<ExcelWriteListener>> excelListeners, org.apache.poi.ss.usermodel.Sheet sheet, org.apache.poi.ss.usermodel.Row row, org.apache.poi.ss.usermodel.Cell cell, ExcelField excelField, Field field, int index, int colIndex, RowType rowType, Object value)
excelListeners - excelListenerssheet - Current sheetrow - Current rowcell - Current cellindex - Data indexing, depending on the row type, starts at 0colIndex - Current cell indexrowType - Current row typeexcelField - ExcelField annotation of current fieldfield - Current fieldvalue - Cell valuepublic static void doCreateRowBefore(Map<Class<? extends ExcelWriteListener>,List<ExcelWriteListener>> excelListeners, org.apache.poi.ss.usermodel.Sheet sheet, int index, RowType rowType)
sheet - Current sheetindex - Data indexing, depending on the row type, starts at 0rowType - Current row typepublic static void doCompleteRow(Map<Class<? extends ExcelWriteListener>,List<ExcelWriteListener>> excelListeners, org.apache.poi.ss.usermodel.Sheet sheet, org.apache.poi.ss.usermodel.Row row, Object obj, int index, RowType rowType)
excelListeners - excelListenerssheet - Current sheetrow - Create the finished rowobj - Current java objectindex - Data indexing, depending on the row type, starts at 0rowType - Current row typepublic static void doCompleteSheet(ExcelWriterContext context)
context - Excel write contextpublic static void doWorkbookFlushBefore(ExcelWriterContext context)
context - Excel write contextpublic static <R> boolean doReadRow(List<ExcelReadListener> rowReadListeners, R r, List<?> otherValues, int rowIndex, RowType rowType)
R - RrowReadListeners - rowReadListenersr - Generated Java objectrowIndex - The index of the current rowotherValues - Except for the content of the bodyrowType - Current row typepublic static <R> void doReadBefore(List<ExcelReadListener> listeners, ExcelReaderContext<R> context)
R - The genericlisteners - Excel read listenerscontext - Excel reader contextpublic static Object doReadCell(List<ExcelReadListener> rowReadListeners, Object cellValue, Field field, int rowIndex, int colIndex, RowType rowType)
rowReadListeners - rowReadListenerscellValue - Current cell valuefield - Current fieldrowIndex - Current row indexcolIndex - Current col indexrowType - Current row typepublic static <R> void doReadFinish(List<ExcelReadListener> rowReadListeners, ExcelReaderContext<R> context)
R - RrowReadListeners - rowReadListenerscontext - Excel reader contextpublic static <R> boolean doReadEmpty(List<ExcelReadListener> emptyReadListeners, R r, Field field, ExcelField excelField, int rowIndex, int colIndex)
R - RemptyReadListeners - emptyReadListenersr - Current Java objectfield - Current fieldexcelField - ExcelField annotation on that fieldrowIndex - The index of the current rowcolIndex - The index of the current colpublic static <R> void doResultNotify(ExcelResultReadListener<R> resultReadListener, List<R> data)
R - RresultReadListener - resultReadListenerdata - Import all the Java objects generated after successpublic static void addWriteListener(Map<Class<? extends ExcelWriteListener>,List<ExcelWriteListener>> writeListenerCache, ExcelWriteListener listener, org.apache.poi.ss.usermodel.Workbook workbook)
writeListenerCache - writeListenerCachelistener - Write listenerworkbook - workbookpublic static void addReadListener(Map<Class<? extends ExcelReadListener>,List<ExcelReadListener>> readListenersCache, ExcelReadListener readListener)
readListenersCache - readListenersCachereadListener - read ListenerCopyright © 2021. All rights reserved.