mirror of https://github.com/apache/poi.git
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:
parent
417868e70c
commit
79c5a9f021
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.<br/>
|
||||
*
|
||||
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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.<br/>
|
||||
|
@ -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();
|
||||
|
||||
|
|
|
@ -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.<br/>
|
||||
*
|
||||
* 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() {
|
||||
|
|
|
@ -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)}.<br/>
|
||||
*
|
||||
* 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() {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue