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
This commit is contained in:
Javen O'Neal 2016-07-07 23:20:34 +00:00
parent bb7da64c25
commit 4c72ddaba1
11 changed files with 55 additions and 3 deletions

View File

@ -19,10 +19,12 @@ package org.apache.poi.hssf.usermodel;
import org.apache.poi.ss.formula.EvaluationCell; import org.apache.poi.ss.formula.EvaluationCell;
import org.apache.poi.ss.formula.EvaluationSheet; import org.apache.poi.ss.formula.EvaluationSheet;
import org.apache.poi.util.Internal;
/** /**
* HSSF wrapper for a sheet under evaluation * HSSF wrapper for a sheet under evaluation
*/ */
@Internal
final class HSSFEvaluationSheet implements EvaluationSheet { final class HSSFEvaluationSheet implements EvaluationSheet {
private final HSSFSheet _hs; private final HSSFSheet _hs;
@ -47,6 +49,9 @@ final class HSSFEvaluationSheet implements EvaluationSheet {
return new HSSFEvaluationCell(cell, this); return new HSSFEvaluationCell(cell, this);
} }
/* (non-JavaDoc), inherit JavaDoc from EvaluationSheet
* @since POI 3.15 beta 3
*/
@Override @Override
public void clearAllCachedResultValues() { public void clearAllCachedResultValues() {
// nothing to do // nothing to do

View File

@ -41,12 +41,14 @@ import org.apache.poi.ss.formula.udf.UDFFinder;
import org.apache.poi.ss.usermodel.Table; import org.apache.poi.ss.usermodel.Table;
import org.apache.poi.ss.util.AreaReference; import org.apache.poi.ss.util.AreaReference;
import org.apache.poi.ss.util.CellReference; import org.apache.poi.ss.util.CellReference;
import org.apache.poi.util.Internal;
import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger; import org.apache.poi.util.POILogger;
/** /**
* Internal POI use only * Internal POI use only
*/ */
@Internal
public final class HSSFEvaluationWorkbook implements FormulaRenderingWorkbook, EvaluationWorkbook, FormulaParsingWorkbook { public final class HSSFEvaluationWorkbook implements FormulaRenderingWorkbook, EvaluationWorkbook, FormulaParsingWorkbook {
private static POILogger logger = POILogFactory.getLogger(HSSFEvaluationWorkbook.class); private static POILogger logger = POILogFactory.getLogger(HSSFEvaluationWorkbook.class);
private final HSSFWorkbook _uBook; private final HSSFWorkbook _uBook;
@ -64,6 +66,9 @@ public final class HSSFEvaluationWorkbook implements FormulaRenderingWorkbook, E
_iBook = book.getWorkbook(); _iBook = book.getWorkbook();
} }
/* (non-JavaDoc), inherit JavaDoc from EvaluationWorkbook
* @since POI 3.15 beta 3
*/
@Override @Override
public void clearAllCachedResultValues() { public void clearAllCachedResultValues() {
// nothing to do // nothing to do

View File

@ -17,6 +17,8 @@
package org.apache.poi.ss.formula; package org.apache.poi.ss.formula;
import org.apache.poi.util.Internal;
/** /**
* Abstracts a sheet for the purpose of formula evaluation.<br/> * Abstracts a sheet for the purpose of formula evaluation.<br/>
* *
@ -24,6 +26,7 @@ package org.apache.poi.ss.formula;
* *
* @author Josh Micich * @author Josh Micich
*/ */
@Internal
public interface EvaluationSheet { public interface EvaluationSheet {
/** /**
@ -36,6 +39,7 @@ public interface EvaluationSheet {
* *
* @see WorkbookEvaluator#clearAllCachedResultValues() * @see WorkbookEvaluator#clearAllCachedResultValues()
* @see EvaluationWorkbook#clearAllCachedResultValues() * @see EvaluationWorkbook#clearAllCachedResultValues()
* @since POI 3.15 beta 3
*/ */
public void clearAllCachedResultValues(); public void clearAllCachedResultValues();
} }

View File

@ -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.NameXPtg;
import org.apache.poi.ss.formula.ptg.Ptg; import org.apache.poi.ss.formula.ptg.Ptg;
import org.apache.poi.ss.formula.udf.UDFFinder; import org.apache.poi.ss.formula.udf.UDFFinder;
import org.apache.poi.util.Internal;
/** /**
* Abstracts a workbook for the purpose of formula evaluation.<br/> * Abstracts a workbook for the purpose of formula evaluation.<br/>
@ -29,6 +30,7 @@ import org.apache.poi.ss.formula.udf.UDFFinder;
* *
* @author Josh Micich * @author Josh Micich
*/ */
@Internal
public interface EvaluationWorkbook { public interface EvaluationWorkbook {
String getSheetName(int sheetIndex); String getSheetName(int sheetIndex);
/** /**
@ -78,6 +80,8 @@ public interface EvaluationWorkbook {
* Propagated from {@link WorkbookEvaluator#clearAllCachedResultValues()} to clear locally cached data. * 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. * Implementations must call the same method on all referenced {@link EvaluationSheet} instances, as well as clearing local caches.
* @see WorkbookEvaluator#clearAllCachedResultValues() * @see WorkbookEvaluator#clearAllCachedResultValues()
*
* @since POI 3.15 beta 3
*/ */
public void clearAllCachedResultValues(); public void clearAllCachedResultValues();

View File

@ -28,15 +28,19 @@ import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.util.CellReference; 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 * 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)}, * 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 * 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.<br/>
*
* For POI internal use only
* *
* @author Josh Micich * @author Josh Micich
*/ */
@Internal
final class ForkedEvaluationSheet implements EvaluationSheet { final class ForkedEvaluationSheet implements EvaluationSheet {
private final EvaluationSheet _masterSheet; private final EvaluationSheet _masterSheet;
@ -105,6 +109,8 @@ final class ForkedEvaluationSheet implements EvaluationSheet {
/* (non-Javadoc) /* (non-Javadoc)
* leave the map alone, if it needs resetting, reusing this class is probably a bad idea. * leave the map alone, if it needs resetting, reusing this class is probably a bad idea.
* @see org.apache.poi.ss.formula.EvaluationSheet#clearAllCachedResultValues() * @see org.apache.poi.ss.formula.EvaluationSheet#clearAllCachedResultValues()
*
* @since POI 3.15 beta 3
*/ */
@Override @Override
public void clearAllCachedResultValues() { public void clearAllCachedResultValues() {

View File

@ -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.ptg.Ptg;
import org.apache.poi.ss.formula.udf.UDFFinder; import org.apache.poi.ss.formula.udf.UDFFinder;
import org.apache.poi.ss.usermodel.Workbook; 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 * 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 * 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)}.<br/>
*
* For POI internal use only
*/ */
@Internal
final class ForkedEvaluationWorkbook implements EvaluationWorkbook { final class ForkedEvaluationWorkbook implements EvaluationWorkbook {
private final EvaluationWorkbook _masterBook; private final EvaluationWorkbook _masterBook;
@ -154,6 +158,8 @@ final class ForkedEvaluationWorkbook implements EvaluationWorkbook {
/* (non-Javadoc) /* (non-Javadoc)
* leave the map alone, if it needs resetting, reusing this class is probably a bad idea. * leave the map alone, if it needs resetting, reusing this class is probably a bad idea.
* @see org.apache.poi.ss.formula.EvaluationSheet#clearAllCachedResultValues() * @see org.apache.poi.ss.formula.EvaluationSheet#clearAllCachedResultValues()
*
* @since POI 3.15 beta 3
*/ */
@Override @Override
public void clearAllCachedResultValues() { public void clearAllCachedResultValues() {

View File

@ -19,10 +19,12 @@ package org.apache.poi.xssf.streaming;
import org.apache.poi.ss.formula.EvaluationCell; import org.apache.poi.ss.formula.EvaluationCell;
import org.apache.poi.ss.formula.EvaluationSheet; import org.apache.poi.ss.formula.EvaluationSheet;
import org.apache.poi.util.Internal;
/** /**
* SXSSF wrapper for a sheet under evaluation * SXSSF wrapper for a sheet under evaluation
*/ */
@Internal
final class SXSSFEvaluationSheet implements EvaluationSheet { final class SXSSFEvaluationSheet implements EvaluationSheet {
private final SXSSFSheet _xs; private final SXSSFSheet _xs;
@ -49,6 +51,9 @@ final class SXSSFEvaluationSheet implements EvaluationSheet {
return new SXSSFEvaluationCell(cell, this); return new SXSSFEvaluationCell(cell, this);
} }
/* (non-JavaDoc), inherit JavaDoc from EvaluationSheet
* @since POI 3.15 beta 3
*/
@Override @Override
public void clearAllCachedResultValues() { public void clearAllCachedResultValues() {
// nothing to do // nothing to do

View File

@ -23,10 +23,12 @@ import org.apache.poi.ss.formula.FormulaParser;
import org.apache.poi.ss.formula.FormulaType; import org.apache.poi.ss.formula.FormulaType;
import org.apache.poi.ss.formula.ptg.Ptg; import org.apache.poi.ss.formula.ptg.Ptg;
import org.apache.poi.xssf.usermodel.BaseXSSFEvaluationWorkbook; import org.apache.poi.xssf.usermodel.BaseXSSFEvaluationWorkbook;
import org.apache.poi.util.Internal;
/** /**
* SXSSF wrapper around the SXSSF and XSSF workbooks * SXSSF wrapper around the SXSSF and XSSF workbooks
*/ */
@Internal
public final class SXSSFEvaluationWorkbook extends BaseXSSFEvaluationWorkbook { public final class SXSSFEvaluationWorkbook extends BaseXSSFEvaluationWorkbook {
private final SXSSFWorkbook _uBook; private final SXSSFWorkbook _uBook;

View File

@ -43,12 +43,14 @@ import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.util.AreaReference; import org.apache.poi.ss.util.AreaReference;
import org.apache.poi.ss.util.CellReference; import org.apache.poi.ss.util.CellReference;
import org.apache.poi.util.NotImplemented; import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.Internal;
import org.apache.poi.xssf.model.ExternalLinksTable; import org.apache.poi.xssf.model.ExternalLinksTable;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDefinedName; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDefinedName;
/** /**
* Internal POI use only - parent of XSSF and SXSSF evaluation workbooks * Internal POI use only - parent of XSSF and SXSSF evaluation workbooks
*/ */
@Internal
public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWorkbook, EvaluationWorkbook, FormulaParsingWorkbook { public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWorkbook, EvaluationWorkbook, FormulaParsingWorkbook {
protected final XSSFWorkbook _uBook; protected final XSSFWorkbook _uBook;
@ -61,6 +63,9 @@ public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWork
_uBook = book; _uBook = book;
} }
/* (non-JavaDoc), inherit JavaDoc from EvaluationWorkbook
* @since POI 3.15 beta 3
*/
@Override @Override
public void clearAllCachedResultValues() { public void clearAllCachedResultValues() {
_tableCache = null; _tableCache = null;

View File

@ -24,10 +24,12 @@ import org.apache.poi.ss.formula.EvaluationCell;
import org.apache.poi.ss.formula.EvaluationSheet; import org.apache.poi.ss.formula.EvaluationSheet;
import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.util.Internal;
/** /**
* XSSF wrapper for a sheet under evaluation * XSSF wrapper for a sheet under evaluation
*/ */
@Internal
final class XSSFEvaluationSheet implements EvaluationSheet { final class XSSFEvaluationSheet implements EvaluationSheet {
private final XSSFSheet _xs; private final XSSFSheet _xs;
@ -41,6 +43,9 @@ final class XSSFEvaluationSheet implements EvaluationSheet {
return _xs; return _xs;
} }
/* (non-JavaDoc), inherit JavaDoc from EvaluationWorkbook
* @since POI 3.15 beta 3
*/
@Override @Override
public void clearAllCachedResultValues() { public void clearAllCachedResultValues() {
_cellCache = null; _cellCache = null;

View File

@ -22,10 +22,12 @@ import org.apache.poi.ss.formula.EvaluationSheet;
import org.apache.poi.ss.formula.FormulaParser; import org.apache.poi.ss.formula.FormulaParser;
import org.apache.poi.ss.formula.FormulaType; import org.apache.poi.ss.formula.FormulaType;
import org.apache.poi.ss.formula.ptg.Ptg; import org.apache.poi.ss.formula.ptg.Ptg;
import org.apache.poi.util.Internal;
/** /**
* Internal POI use only * Internal POI use only
*/ */
@Internal
public final class XSSFEvaluationWorkbook extends BaseXSSFEvaluationWorkbook { public final class XSSFEvaluationWorkbook extends BaseXSSFEvaluationWorkbook {
private XSSFEvaluationSheet[] _sheetCache; private XSSFEvaluationSheet[] _sheetCache;
@ -40,6 +42,9 @@ public final class XSSFEvaluationWorkbook extends BaseXSSFEvaluationWorkbook {
super(book); super(book);
} }
/* (non-JavaDoc), inherit JavaDoc from EvaluationSheet
* @since POI 3.15 beta 3
*/
@Override @Override
public void clearAllCachedResultValues() { public void clearAllCachedResultValues() {
super.clearAllCachedResultValues(); super.clearAllCachedResultValues();