public class HeaderRow extends Row
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
CAMEL_CASE
Camel Case (CAMEL_CASE to camelCase)
|
protected Class<?> |
clazz |
protected ListSheet.EntryColumn[] |
columns |
static int |
FORCE_IMPORT
Force Import (Match with field name if without
ExcelColumn annotation) |
protected int |
headRows |
static int |
IGNORE_CASE
Ignore Case (Ignore case matching column names)
|
protected Map<String,Integer> |
mapping |
protected String[] |
names |
protected int |
option
Simple properties
Bit | Contents
------+---------
31. 1 | Force Import
30. 1 | Ignore Case (Ignore case matching column names)
29. 1 | Camel Case
|
protected Object |
t |
| 构造器和说明 |
|---|
HeaderRow() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Map<String,Method> |
attachOtherColumn(Class<?> clazz)
Attach some others column
|
protected int |
check(String first,
String second) |
protected ListSheet.EntryColumn |
createColumn(AccessibleObject ao)
Create column from
ExcelColumn annotation
Override the method to extend custom comments |
protected ListSheet.EntryColumn |
createColumnByAnnotation(Annotation anno)
Create column by
ExcelColumn annotation |
static HeaderRow |
emptyHeader() |
protected void |
fieldPut(int i,
Row row,
Object t) |
String |
get(int columnIndex)
Get the column name by column index
|
CellType |
getCellType(int columnIndex)
获取单元格的数据类型
注意:这里仅是一个近似的类型,因为从原始文件中只能获取到
numeric,string,
boolean三种类型。 |
Class<?> |
getClazz() |
protected ListSheet.EntryColumn[] |
getColumns() |
int |
getIndex(String columnName)
Returns the position in cell range
|
String[] |
getNames()
Get the name of columns
|
<T> T |
getT() |
protected boolean |
ignoreColumn(AccessibleObject ao)
Ignore some columns, override this method to add custom filtering
|
boolean |
is(Class<?> clazz) |
protected String |
makeKey(String key) |
protected void |
mergeCellsIfNull(List<Dimension> mergeCells,
Row[] rows)
Copy column name on merge cells
|
protected void |
methodPut(int i,
Row row,
Object t) |
protected HeaderRow |
setClass(Class<?> clazz)
mapping
|
protected HeaderRow |
setClassOnce(Class<?> clazz)
mapping and instance
|
HeaderRow |
setOptions(int option) |
protected int |
simpleTestLength(String name)
已过时。
未使用,后续删除
|
String |
toMarkdownString()
已过时。
未使用,后续删除
|
String |
toString() |
HeaderRow |
with(int headRows,
Row... rows) |
HeaderRow |
with(List<Dimension> mergeCells,
int headRows,
Row... rows) |
HeaderRow |
with(List<Dimension> mergeCells,
Row... rows) |
HeaderRow |
with(Row... rows) |
asHeader, copyCells, copyCells, geet, get, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCell, getCell, getCellStyle, getCellStyle, getCellStyle, getCellType, getCellType, getChar, getChar, getChar, getDate, getDate, getDate, getDecimal, getDecimal, getDecimal, getDouble, getDouble, getDouble, getFirstColumnIndex, getFloat, getFloat, getFloat, getFormula, getFormula, getFormula, getHeader, getHeight, getInt, getInt, getInt, getLastColumnIndex, getLocalDate, getLocalDate, getLocalDate, getLocalDateTime, getLocalDateTime, getLocalDateTime, getLocalTime, getLocalTime, getLocalTime, getLong, getLong, getLong, getRowIndex, getRowNum, getSharedStrings, getShort, getShort, getShort, getString, getString, getString, getStyles, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, hasFormula, hasFormula, hasFormula, isBlank, isBlank, isBlank, isBlank, isEmpty, isHidden, nonBlank, nonEmpty, rangeCheck, setCells, setCells, setHeader, testNumberType, to, toCellIndex, toMap, toopublic static final int FORCE_IMPORT
ExcelColumn annotation)public static final int IGNORE_CASE
public static final int CAMEL_CASE
protected String[] names
protected Class<?> clazz
protected Object t
protected ListSheet.EntryColumn[] columns
protected int headRows
protected int option
Bit | Contents ------+--------- 31. 1 | Force Import 30. 1 | Ignore Case (Ignore case matching column names) 29. 1 | Camel Case
public static HeaderRow emptyHeader()
public final boolean is(Class<?> clazz)
protected HeaderRow setClass(Class<?> clazz)
clazz - the type of bindingprotected HeaderRow setClassOnce(Class<?> clazz) throws IllegalAccessException, InstantiationException
clazz - the type of bindingIllegalAccessException - -InstantiationException - -protected ListSheet.EntryColumn[] getColumns()
public <T> T getT()
public Class<?> getClazz()
public CellType getCellType(int columnIndex)
Row注意:这里仅是一个近似的类型,因为从原始文件中只能获取到numeric,string,
boolean三种类型。在解析到原始类型之后对于numeric类型会根据数字大小和格式重新设置类型,
比如小于0x7fffffff的值为int,超过这个范围时为long,如果带日期格式化则为date类型,
小数也是同样处理,有日期格式化为data类型否则为decimal类型
getCellType 在类中 RowcolumnIndex - 列索引CellTypepublic String get(int columnIndex)
columnIndex - the cell indexpublic String[] getNames()
public int getIndex(String columnName)
columnName - the column name@Deprecated public String toMarkdownString()
@Deprecated protected int simpleTestLength(String name)
name - 标题protected void fieldPut(int i,
Row row,
Object t)
throws IllegalAccessException
protected void methodPut(int i,
Row row,
Object t)
throws IllegalAccessException,
InvocationTargetException
protected boolean ignoreColumn(AccessibleObject ao)
ao - Method or Fieldprotected Map<String,Method> attachOtherColumn(Class<?> clazz)
clazz - Target classprotected ListSheet.EntryColumn createColumn(AccessibleObject ao)
ExcelColumn annotation
Override the method to extend custom comments
ao - AccessibleObject witch defined the ExcelColumn annotationListSheet.EntryColumn informationprotected ListSheet.EntryColumn createColumnByAnnotation(Annotation anno)
ExcelColumn annotationanno - an java annotationColumn or null if annotation is nullprotected void mergeCellsIfNull(List<Dimension> mergeCells, Row[] rows)
mergeCells - merged cell in header rowsrows - the header rowspublic HeaderRow setOptions(int option)
Copyright © 2025. All rights reserved.