-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
e6f7078
commit e9856e5
Showing
21 changed files
with
483 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
easyexcel-core/src/main/java/com/alibaba/excel/enums/CacheLocationEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.alibaba.excel.enums; | ||
|
||
/** | ||
* cache locaciton | ||
* | ||
* @author Jiaju Zhuang | ||
**/ | ||
public enum CacheLocationEnum { | ||
/** | ||
* The cache will be stored in {@code ThreadLocal}, and will be cleared when the excel read and write is completed. | ||
*/ | ||
THREAD_LOCAL, | ||
|
||
/** | ||
* The cache will not be cleared unless the app is stopped. | ||
*/ | ||
MEMORY, | ||
|
||
/** | ||
* No caching.It may lose some of performance. | ||
*/ | ||
NONE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
easyexcel-core/src/main/java/com/alibaba/excel/metadata/FieldCache.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.alibaba.excel.metadata; | ||
|
||
import java.lang.reflect.Field; | ||
import java.util.Map; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* filed cache | ||
* | ||
* @author Jiaju Zhuang | ||
*/ | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode | ||
@AllArgsConstructor | ||
public class FieldCache { | ||
|
||
/** | ||
* A field cache that has been sorted by a class. | ||
* It will exclude fields that are not needed. | ||
*/ | ||
private Map<Integer, Field> sortedFieldMap; | ||
|
||
/** | ||
* Fields using the index attribute | ||
*/ | ||
private Map<Integer, Field> indexFieldMap; | ||
|
||
/** | ||
* Fields to ignore | ||
*/ | ||
private Map<String, Field> ignoreMap; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.