public class ClassUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ClassUtils.ContentPropertyKey |
| Modifier and Type | Field and Description |
|---|---|
static Map<Class<?>,Map<String,ExcelContentProperty>> |
CLASS_CONTENT_CACHE
The cache configuration information for each of the class
|
static Map<ClassUtils.ContentPropertyKey,ExcelContentProperty> |
CONTENT_CACHE
The cache configuration information for each of the class
|
static Map<Class<?>,com.alibaba.excel.util.ClassUtils.FieldCache> |
FIELD_CACHE |
| Constructor and Description |
|---|
ClassUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
combineExcelContentProperty(ExcelContentProperty combineExcelContentProperty,
ExcelContentProperty excelContentProperty) |
static ExcelContentProperty |
declaredExcelContentProperty(Map<?,?> dataMap,
Class<?> headClazz,
String fieldName)
Calculate the configuration information for the class
|
static void |
declaredFields(Class<?> clazz,
Map<Integer,Field> sortedAllFieldMap,
Boolean needIgnore,
WriteHolder writeHolder) |
static void |
declaredFields(Class<?> clazz,
Map<Integer,Field> sortedAllFieldMap,
Map<Integer,Field> indexFieldMap,
Map<String,Field> ignoreMap,
Boolean needIgnore,
Holder holder)
Parsing field in the class
|
static List<Class<?>> |
getAllInterfaces(Class<?> cls)
Gets a
List of all interfaces implemented by the given
class and its superclasses. |
public static final Map<Class<?>,com.alibaba.excel.util.ClassUtils.FieldCache> FIELD_CACHE
public static final Map<Class<?>,Map<String,ExcelContentProperty>> CLASS_CONTENT_CACHE
public static final Map<ClassUtils.ContentPropertyKey,ExcelContentProperty> CONTENT_CACHE
public static ExcelContentProperty declaredExcelContentProperty(Map<?,?> dataMap, Class<?> headClazz, String fieldName)
dataMap - headClazz - fieldName - public static void combineExcelContentProperty(ExcelContentProperty combineExcelContentProperty, ExcelContentProperty excelContentProperty)
public static void declaredFields(Class<?> clazz, Map<Integer,Field> sortedAllFieldMap, Map<Integer,Field> indexFieldMap, Map<String,Field> ignoreMap, Boolean needIgnore, Holder holder)
clazz - Need to parse the classsortedAllFieldMap - Complete the map of sortsindexFieldMap - Use the index to sort fieldsignoreMap - You want to ignore field mapneedIgnore - If you want to ignore fields need to ignoreholder - holderpublic static void declaredFields(Class<?> clazz, Map<Integer,Field> sortedAllFieldMap, Boolean needIgnore, WriteHolder writeHolder)
public static List<Class<?>> getAllInterfaces(Class<?> cls)
Gets a List of all interfaces implemented by the given
class and its superclasses.
The order is determined by looking through each interface in turn as declared in the source file and following its hierarchy up. Then each superclass is considered in the same way. Later duplicates are ignored, so the order is maintained.
cls - the class to look up, may be nullList of interfaces in order,
null if null inputCopyright © 2018–2023 Alibaba Group. All rights reserved.