Browse Source

修改javadoc规范

developing
Jiaju Zhuang 3 years ago
parent
commit
329cc3d1f2
  1. 2
      README.md
  2. 4
      src/main/java/com/alibaba/excel/read/metadata/holder/ReadSheetHolder.java
  3. 2
      src/main/java/com/alibaba/excel/util/BeanMapUtils.java
  4. 18
      src/main/java/com/alibaba/excel/util/FieldUtils.java
  5. 6
      src/main/java/com/alibaba/excel/util/MapUtils.java
  6. 2
      src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java
  7. 1
      src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java
  8. 1
      src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java
  9. 1
      src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java

2
README.md

@ -31,7 +31,7 @@ Java解析、生成Excel比较有名的框架有Apache poi、jxl。但他们都
* 不建议夸大版本升级 尤其夸2个大版本 * 不建议夸大版本升级 尤其夸2个大版本
* 2+ 升级到 3+ * 2+ 升级到 3+
* 使用了自定义拦截器去修改样式的会出问题 * 使用了自定义拦截器去修改样式的会出问题
* 升级后建议相关内容重新测试下 * 大版本升级后建议相关内容重新测试下
## 人员招募 ## 人员招募
由于工作较忙,有意愿做开源的同学可以报名,主要负责群里回答&issue处理,当然也可以做一些PR. 由于工作较忙,有意愿做开源的同学可以报名,主要负责群里回答&issue处理,当然也可以做一些PR.

4
src/main/java/com/alibaba/excel/read/metadata/holder/ReadSheetHolder.java

@ -74,10 +74,10 @@ public class ReadSheetHolder extends AbstractReadHolder {
} }
/** /**
* Approximate total number of rows * Approximate total number of rows.
* use: getApproximateTotalRowNumber()
* *
* @return * @return
* @see #getApproximateTotalRowNumber()
*/ */
@Deprecated @Deprecated
public Integer getTotal() { public Integer getTotal() {

2
src/main/java/com/alibaba/excel/util/BeanMapUtils.java

@ -17,7 +17,7 @@ public class BeanMapUtils {
* <code>BeanMap.Generator</code> instead of this static method. * <code>BeanMap.Generator</code> instead of this static method.
* *
* Custom naming policy to prevent null pointer exceptions. * Custom naming policy to prevent null pointer exceptions.
* <url>https://github.com/alibaba/easyexcel/issues/2064</url> * see: https://github.com/alibaba/easyexcel/issues/2064
* *
* @param bean the JavaBean underlying the map * @param bean the JavaBean underlying the map
* @return a new <code>BeanMap</code> instance * @return a new <code>BeanMap</code> instance

18
src/main/java/com/alibaba/excel/util/FieldUtils.java

@ -41,15 +41,15 @@ public class FieldUtils {
/** /**
* Parsing the name matching cglib * Parsing the name matching cglib
* <ul> * <pre>
* <ul>null -> null</ul> * null -&gt; null
* <ul>string1 -> string1</ul> * string1 -&gt; string1
* <ul>String2 -> string2</ul> * String2 -&gt; string2
* <ul>sTring3 -> STring3</ul> * sTring3 -&gt; STring3
* <ul>STring4 -> STring4</ul> * STring4 -&gt; STring4
* <ul>STRING5 -> STRING5</ul> * STRING5 -&gt; STRING5
* <ul>STRing6 -> STRing6</ul> * STRing6 -&gt; STRing6
* </ul> * </pre>
* *
* @param field field * @param field field
* @return field name. * @return field name.

6
src/main/java/com/alibaba/excel/util/MapUtils.java

@ -17,9 +17,9 @@ public class MapUtils {
/** /**
* Creates a <i>mutable</i>, empty {@code HashMap} instance. * Creates a <i>mutable</i>, empty {@code HashMap} instance.
* *
* <p><b>Note:</b> if mutability is not required, use {@link ImmutableMap#of()} instead. * <p><b>Note:</b> if mutability is not required, use ImmutableMap.of() instead.
* *
* <p><b>Note:</b> if {@code K} is an {@code enum} type, use {@link #newEnumMap} instead. * <p><b>Note:</b> if {@code K} is an {@code enum} type, use newEnumMap instead.
* *
* <p><b>Note for Java 7 and later:</b> this method is now unnecessary and should be treated as * <p><b>Note for Java 7 and later:</b> this method is now unnecessary and should be treated as
* deprecated. Instead, use the {@code HashMap} constructor directly, taking advantage of the new * deprecated. Instead, use the {@code HashMap} constructor directly, taking advantage of the new
@ -35,7 +35,7 @@ public class MapUtils {
* Creates a <i>mutable</i>, empty {@code TreeMap} instance using the natural ordering of its * Creates a <i>mutable</i>, empty {@code TreeMap} instance using the natural ordering of its
* elements. * elements.
* *
* <p><b>Note:</b> if mutability is not required, use {@link ImmutableSortedMap#of()} instead. * <p><b>Note:</b> if mutability is not required, use ImmutableSortedMap.of() instead.
* *
* <p><b>Note for Java 7 and later:</b> this method is now unnecessary and should be treated as * <p><b>Note for Java 7 and later:</b> this method is now unnecessary and should be treated as
* deprecated. Instead, use the {@code TreeMap} constructor directly, taking advantage of the new * deprecated. Instead, use the {@code TreeMap} constructor directly, taking advantage of the new

2
src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java

@ -20,7 +20,7 @@ public class PoiUtils {
/** /**
* Whether to customize the height * Whether to customize the height
* *
* @param row * @param row row
* @return * @return
*/ */
public static boolean customHeight(Row row) { public static boolean customHeight(Row row) {

1
src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java

@ -72,6 +72,7 @@ public class FillTest {
EasyExcel.write(fileName).withTemplate(templateFileName).sheet().doFill(data()); EasyExcel.write(fileName).withTemplate(templateFileName).sheet().doFill(data());
// 方案2 分多次 填充 会使用文件缓存(省内存) jdk8 // 方案2 分多次 填充 会使用文件缓存(省内存) jdk8
// since: 3.0.0-beta1
fileName = TestFileUtil.getPath() + "listFill" + System.currentTimeMillis() + ".xlsx"; fileName = TestFileUtil.getPath() + "listFill" + System.currentTimeMillis() + ".xlsx";
EasyExcel.write(fileName) EasyExcel.write(fileName)
.withTemplate(templateFileName) .withTemplate(templateFileName)

1
src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java

@ -46,6 +46,7 @@ public class ReadTest {
@Test @Test
public void simpleRead() { public void simpleRead() {
// 写法1:JDK8+ ,不用额外写一个ReadListener // 写法1:JDK8+ ,不用额外写一个ReadListener
// since: 3.0.0-beta1
String fileName = TestFileUtil.getPath() + "demo" + File.separator + "demo.xlsx"; String fileName = TestFileUtil.getPath() + "demo" + File.separator + "demo.xlsx";
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭 // 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
// 这里每次会读取3000条数据 然后返回过来 直接调用使用数据就行 // 这里每次会读取3000条数据 然后返回过来 直接调用使用数据就行

1
src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java

@ -60,6 +60,7 @@ public class WriteTest {
@Test @Test
public void simpleWrite() { public void simpleWrite() {
// 写法1 JDK8+ // 写法1 JDK8+
// since: 3.0.0-beta1
String fileName = TestFileUtil.getPath() + "simpleWrite" + System.currentTimeMillis() + ".xlsx"; String fileName = TestFileUtil.getPath() + "simpleWrite" + System.currentTimeMillis() + ".xlsx";
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭
// 如果这里想使用03 则 传入excelType参数即可 // 如果这里想使用03 则 传入excelType参数即可

Loading…
Cancel
Save