From 4c72ddaba1901eb66eca8e053df15aba7762ff20 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Thu, 7 Jul 2016 23:20:34 +0000 Subject: [PATCH] add @Internal annotations to implementations of Internal EvaluationWorkbook and EvaluationSheet interfaces; added @since annotations to clearAllCachedResultValues added in r1751836. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751843 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hssf/usermodel/HSSFEvaluationSheet.java | 7 ++++++- .../apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java | 5 +++++ src/java/org/apache/poi/ss/formula/EvaluationSheet.java | 4 ++++ .../org/apache/poi/ss/formula/EvaluationWorkbook.java | 4 ++++ .../poi/ss/formula/eval/forked/ForkedEvaluationSheet.java | 8 +++++++- .../ss/formula/eval/forked/ForkedEvaluationWorkbook.java | 8 +++++++- .../apache/poi/xssf/streaming/SXSSFEvaluationSheet.java | 5 +++++ .../poi/xssf/streaming/SXSSFEvaluationWorkbook.java | 2 ++ .../poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java | 5 +++++ .../apache/poi/xssf/usermodel/XSSFEvaluationSheet.java | 5 +++++ .../apache/poi/xssf/usermodel/XSSFEvaluationWorkbook.java | 5 +++++ 11 files changed, 55 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationSheet.java b/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationSheet.java index 229788600..f1b8d7bf3 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationSheet.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationSheet.java @@ -19,10 +19,12 @@ package org.apache.poi.hssf.usermodel; import org.apache.poi.ss.formula.EvaluationCell; import org.apache.poi.ss.formula.EvaluationSheet; +import org.apache.poi.util.Internal; /** * HSSF wrapper for a sheet under evaluation */ +@Internal final class HSSFEvaluationSheet implements EvaluationSheet { private final HSSFSheet _hs; @@ -46,7 +48,10 @@ final class HSSFEvaluationSheet implements EvaluationSheet { } return new HSSFEvaluationCell(cell, this); } - + + /* (non-JavaDoc), inherit JavaDoc from EvaluationSheet + * @since POI 3.15 beta 3 + */ @Override public void clearAllCachedResultValues() { // nothing to do diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java b/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java index 2aab3985a..1feb96c3e 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java @@ -41,12 +41,14 @@ import org.apache.poi.ss.formula.udf.UDFFinder; import org.apache.poi.ss.usermodel.Table; import org.apache.poi.ss.util.AreaReference; import org.apache.poi.ss.util.CellReference; +import org.apache.poi.util.Internal; import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogger; /** * Internal POI use only */ +@Internal public final class HSSFEvaluationWorkbook implements FormulaRenderingWorkbook, EvaluationWorkbook, FormulaParsingWorkbook { private static POILogger logger = POILogFactory.getLogger(HSSFEvaluationWorkbook.class); private final HSSFWorkbook _uBook; @@ -64,6 +66,9 @@ public final class HSSFEvaluationWorkbook implements FormulaRenderingWorkbook, E _iBook = book.getWorkbook(); } + /* (non-JavaDoc), inherit JavaDoc from EvaluationWorkbook + * @since POI 3.15 beta 3 + */ @Override public void clearAllCachedResultValues() { // nothing to do diff --git a/src/java/org/apache/poi/ss/formula/EvaluationSheet.java b/src/java/org/apache/poi/ss/formula/EvaluationSheet.java index 06fb6b533..1d5b0655a 100644 --- a/src/java/org/apache/poi/ss/formula/EvaluationSheet.java +++ b/src/java/org/apache/poi/ss/formula/EvaluationSheet.java @@ -17,6 +17,8 @@ package org.apache.poi.ss.formula; +import org.apache.poi.util.Internal; + /** * Abstracts a sheet for the purpose of formula evaluation.
* @@ -24,6 +26,7 @@ package org.apache.poi.ss.formula; * * @author Josh Micich */ +@Internal public interface EvaluationSheet { /** @@ -36,6 +39,7 @@ public interface EvaluationSheet { * * @see WorkbookEvaluator#clearAllCachedResultValues() * @see EvaluationWorkbook#clearAllCachedResultValues() + * @since POI 3.15 beta 3 */ public void clearAllCachedResultValues(); } diff --git a/src/java/org/apache/poi/ss/formula/EvaluationWorkbook.java b/src/java/org/apache/poi/ss/formula/EvaluationWorkbook.java index fc4cfb32b..6c4c17eb3 100644 --- a/src/java/org/apache/poi/ss/formula/EvaluationWorkbook.java +++ b/src/java/org/apache/poi/ss/formula/EvaluationWorkbook.java @@ -21,6 +21,7 @@ import org.apache.poi.ss.formula.ptg.NamePtg; import org.apache.poi.ss.formula.ptg.NameXPtg; import org.apache.poi.ss.formula.ptg.Ptg; import org.apache.poi.ss.formula.udf.UDFFinder; +import org.apache.poi.util.Internal; /** * Abstracts a workbook for the purpose of formula evaluation.
@@ -29,6 +30,7 @@ import org.apache.poi.ss.formula.udf.UDFFinder; * * @author Josh Micich */ +@Internal public interface EvaluationWorkbook { String getSheetName(int sheetIndex); /** @@ -78,6 +80,8 @@ public interface EvaluationWorkbook { * Propagated from {@link WorkbookEvaluator#clearAllCachedResultValues()} to clear locally cached data. * Implementations must call the same method on all referenced {@link EvaluationSheet} instances, as well as clearing local caches. * @see WorkbookEvaluator#clearAllCachedResultValues() + * + * @since POI 3.15 beta 3 */ public void clearAllCachedResultValues(); diff --git a/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationSheet.java b/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationSheet.java index d15a3461a..072a777e1 100644 --- a/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationSheet.java +++ b/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationSheet.java @@ -28,15 +28,19 @@ import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.util.CellReference; +import org.apache.poi.util.Internal; /** * Represents a sheet being used for forked evaluation. Initially, objects of this class contain * only the cells from the master workbook. By calling {@link #getOrCreateUpdatableCell(int, int)}, * the master cell object is logically replaced with a {@link ForkedEvaluationCell} instance, which - * will be used in all subsequent evaluations. + * will be used in all subsequent evaluations.
+ * + * For POI internal use only * * @author Josh Micich */ +@Internal final class ForkedEvaluationSheet implements EvaluationSheet { private final EvaluationSheet _masterSheet; @@ -105,6 +109,8 @@ final class ForkedEvaluationSheet implements EvaluationSheet { /* (non-Javadoc) * leave the map alone, if it needs resetting, reusing this class is probably a bad idea. * @see org.apache.poi.ss.formula.EvaluationSheet#clearAllCachedResultValues() + * + * @since POI 3.15 beta 3 */ @Override public void clearAllCachedResultValues() { diff --git a/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java b/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java index 54cbd644c..adc3e4f07 100644 --- a/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java +++ b/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java @@ -29,12 +29,16 @@ import org.apache.poi.ss.formula.ptg.NameXPtg; import org.apache.poi.ss.formula.ptg.Ptg; import org.apache.poi.ss.formula.udf.UDFFinder; import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.util.Internal; /** * Represents a workbook being used for forked evaluation. Most operations are delegated to the * shared master workbook, except those that potentially involve cell values that may have been - * updated after a call to {@link #getOrCreateUpdatableCell(String, int, int)}. + * updated after a call to {@link #getOrCreateUpdatableCell(String, int, int)}.
+ * + * For POI internal use only */ +@Internal final class ForkedEvaluationWorkbook implements EvaluationWorkbook { private final EvaluationWorkbook _masterBook; @@ -154,6 +158,8 @@ final class ForkedEvaluationWorkbook implements EvaluationWorkbook { /* (non-Javadoc) * leave the map alone, if it needs resetting, reusing this class is probably a bad idea. * @see org.apache.poi.ss.formula.EvaluationSheet#clearAllCachedResultValues() + * + * @since POI 3.15 beta 3 */ @Override public void clearAllCachedResultValues() { diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationSheet.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationSheet.java index e4f6d72cf..57d7cc57b 100644 --- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationSheet.java +++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationSheet.java @@ -19,10 +19,12 @@ package org.apache.poi.xssf.streaming; import org.apache.poi.ss.formula.EvaluationCell; import org.apache.poi.ss.formula.EvaluationSheet; +import org.apache.poi.util.Internal; /** * SXSSF wrapper for a sheet under evaluation */ +@Internal final class SXSSFEvaluationSheet implements EvaluationSheet { private final SXSSFSheet _xs; @@ -49,6 +51,9 @@ final class SXSSFEvaluationSheet implements EvaluationSheet { return new SXSSFEvaluationCell(cell, this); } + /* (non-JavaDoc), inherit JavaDoc from EvaluationSheet + * @since POI 3.15 beta 3 + */ @Override public void clearAllCachedResultValues() { // nothing to do diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationWorkbook.java index 590933687..e9040c912 100644 --- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationWorkbook.java +++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationWorkbook.java @@ -23,10 +23,12 @@ import org.apache.poi.ss.formula.FormulaParser; import org.apache.poi.ss.formula.FormulaType; import org.apache.poi.ss.formula.ptg.Ptg; import org.apache.poi.xssf.usermodel.BaseXSSFEvaluationWorkbook; +import org.apache.poi.util.Internal; /** * SXSSF wrapper around the SXSSF and XSSF workbooks */ +@Internal public final class SXSSFEvaluationWorkbook extends BaseXSSFEvaluationWorkbook { private final SXSSFWorkbook _uBook; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java index 3683c32d2..f3c6bc267 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java @@ -43,12 +43,14 @@ import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.util.AreaReference; import org.apache.poi.ss.util.CellReference; import org.apache.poi.util.NotImplemented; +import org.apache.poi.util.Internal; import org.apache.poi.xssf.model.ExternalLinksTable; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDefinedName; /** * Internal POI use only - parent of XSSF and SXSSF evaluation workbooks */ +@Internal public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWorkbook, EvaluationWorkbook, FormulaParsingWorkbook { protected final XSSFWorkbook _uBook; @@ -61,6 +63,9 @@ public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWork _uBook = book; } + /* (non-JavaDoc), inherit JavaDoc from EvaluationWorkbook + * @since POI 3.15 beta 3 + */ @Override public void clearAllCachedResultValues() { _tableCache = null; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java index 7385a5e0f..c25dfb5d6 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java @@ -24,10 +24,12 @@ import org.apache.poi.ss.formula.EvaluationCell; import org.apache.poi.ss.formula.EvaluationSheet; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.util.Internal; /** * XSSF wrapper for a sheet under evaluation */ +@Internal final class XSSFEvaluationSheet implements EvaluationSheet { private final XSSFSheet _xs; @@ -41,6 +43,9 @@ final class XSSFEvaluationSheet implements EvaluationSheet { return _xs; } + /* (non-JavaDoc), inherit JavaDoc from EvaluationWorkbook + * @since POI 3.15 beta 3 + */ @Override public void clearAllCachedResultValues() { _cellCache = null; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationWorkbook.java index f1d0475c0..2c13f8266 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationWorkbook.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationWorkbook.java @@ -22,10 +22,12 @@ import org.apache.poi.ss.formula.EvaluationSheet; import org.apache.poi.ss.formula.FormulaParser; import org.apache.poi.ss.formula.FormulaType; import org.apache.poi.ss.formula.ptg.Ptg; +import org.apache.poi.util.Internal; /** * Internal POI use only */ +@Internal public final class XSSFEvaluationWorkbook extends BaseXSSFEvaluationWorkbook { private XSSFEvaluationSheet[] _sheetCache; @@ -40,6 +42,9 @@ public final class XSSFEvaluationWorkbook extends BaseXSSFEvaluationWorkbook { super(book); } + /* (non-JavaDoc), inherit JavaDoc from EvaluationSheet + * @since POI 3.15 beta 3 + */ @Override public void clearAllCachedResultValues() { super.clearAllCachedResultValues();