mirror of https://github.com/apache/poi.git
bug 59791: add deprecation warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1760639 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1ff463ffb6
commit
5368c7008a
|
@ -155,7 +155,6 @@ public class HSSFFormulaEvaluator extends BaseFormulaEvaluator {
|
||||||
* @since POI 3.15 beta 3
|
* @since POI 3.15 beta 3
|
||||||
* @deprecated POI 3.15 beta 3. Will be deleted when we make the CellType enum transition. See bug 59791.
|
* @deprecated POI 3.15 beta 3. Will be deleted when we make the CellType enum transition. See bug 59791.
|
||||||
*/
|
*/
|
||||||
@Internal
|
|
||||||
@Override
|
@Override
|
||||||
public CellType evaluateFormulaCellEnum(Cell cell) {
|
public CellType evaluateFormulaCellEnum(Cell cell) {
|
||||||
if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) {
|
if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) {
|
||||||
|
|
|
@ -125,6 +125,7 @@ public abstract class BaseFormulaEvaluator implements FormulaEvaluator, Workbook
|
||||||
* replaced with the result of the formula, use {@link #evaluateInCell(org.apache.poi.ss.usermodel.Cell)}
|
* replaced with the result of the formula, use {@link #evaluateInCell(org.apache.poi.ss.usermodel.Cell)}
|
||||||
* @param cell The cell to evaluate
|
* @param cell The cell to evaluate
|
||||||
* @return -1 for non-formula cells, or the type of the <em>formula result</em>
|
* @return -1 for non-formula cells, or the type of the <em>formula result</em>
|
||||||
|
* @deprecated 3.15. Will return a {@link CellType} enum in the future.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int evaluateFormulaCell(Cell cell) {
|
public int evaluateFormulaCell(Cell cell) {
|
||||||
|
|
|
@ -42,6 +42,7 @@ public interface EvaluationCell {
|
||||||
* For forwards compatibility, do not hard-code cell type literals in your code.
|
* For forwards compatibility, do not hard-code cell type literals in your code.
|
||||||
*
|
*
|
||||||
* @return cell type
|
* @return cell type
|
||||||
|
* @deprecated 3.15. Will return a {@link CellType} enum in the future.
|
||||||
*/
|
*/
|
||||||
int getCellType();
|
int getCellType();
|
||||||
/**
|
/**
|
||||||
|
@ -61,6 +62,7 @@ public interface EvaluationCell {
|
||||||
* For forwards compatibility, do not hard-code cell type literals in your code.
|
* For forwards compatibility, do not hard-code cell type literals in your code.
|
||||||
*
|
*
|
||||||
* @return cell type of cached formula result
|
* @return cell type of cached formula result
|
||||||
|
* @deprecated 3.15. Will return a {@link CellType} enum in the future.
|
||||||
*/
|
*/
|
||||||
int getCachedFormulaResultType();
|
int getCachedFormulaResultType();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -108,6 +108,7 @@ final class ForkedEvaluationCell implements EvaluationCell {
|
||||||
* For forwards compatibility, do not hard-code cell type literals in your code.
|
* For forwards compatibility, do not hard-code cell type literals in your code.
|
||||||
*
|
*
|
||||||
* @return cell type
|
* @return cell type
|
||||||
|
* @deprecated 3.15. Will return a {@link CellType} enum in the future.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getCellType() {
|
public int getCellType() {
|
||||||
|
@ -118,7 +119,6 @@ final class ForkedEvaluationCell implements EvaluationCell {
|
||||||
* @deprecated POI 3.15 beta 3.
|
* @deprecated POI 3.15 beta 3.
|
||||||
* Will be deleted when we make the CellType enum transition. See bug 59791.
|
* Will be deleted when we make the CellType enum transition. See bug 59791.
|
||||||
*/
|
*/
|
||||||
@Internal(since="POI 3.15 beta 3")
|
|
||||||
@Override
|
@Override
|
||||||
public CellType getCellTypeEnum() {
|
public CellType getCellTypeEnum() {
|
||||||
return _cellType;
|
return _cellType;
|
||||||
|
@ -160,6 +160,7 @@ final class ForkedEvaluationCell implements EvaluationCell {
|
||||||
* For forwards compatibility, do not hard-code cell type literals in your code.
|
* For forwards compatibility, do not hard-code cell type literals in your code.
|
||||||
*
|
*
|
||||||
* @return cell type of cached formula result
|
* @return cell type of cached formula result
|
||||||
|
* @deprecated 3.15. Will return a {@link CellType} enum in the future.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getCachedFormulaResultType() {
|
public int getCachedFormulaResultType() {
|
||||||
|
@ -170,7 +171,6 @@ final class ForkedEvaluationCell implements EvaluationCell {
|
||||||
* @deprecated POI 3.15 beta 3.
|
* @deprecated POI 3.15 beta 3.
|
||||||
* Will be deleted when we make the CellType enum transition. See bug 59791.
|
* Will be deleted when we make the CellType enum transition. See bug 59791.
|
||||||
*/
|
*/
|
||||||
@Internal(since="POI 3.15 beta 3")
|
|
||||||
@Override
|
@Override
|
||||||
public CellType getCachedFormulaResultTypeEnum() {
|
public CellType getCachedFormulaResultTypeEnum() {
|
||||||
return _masterCell.getCachedFormulaResultTypeEnum();
|
return _masterCell.getCachedFormulaResultTypeEnum();
|
||||||
|
|
|
@ -167,6 +167,7 @@ public interface Cell {
|
||||||
* For forwards compatibility, do not hard-code cell type literals in your code.
|
* For forwards compatibility, do not hard-code cell type literals in your code.
|
||||||
*
|
*
|
||||||
* @return the cell type
|
* @return the cell type
|
||||||
|
* @deprecated POI 3.15. Will return a {@link CellType} enum in the future.
|
||||||
*/
|
*/
|
||||||
int getCellType();
|
int getCellType();
|
||||||
|
|
||||||
|
@ -178,7 +179,6 @@ public interface Cell {
|
||||||
* @deprecated POI 3.15 beta 3
|
* @deprecated POI 3.15 beta 3
|
||||||
* Will be renamed to <code>getCellType()</code> when we make the CellType enum transition in POI 4.0. See bug 59791.
|
* Will be renamed to <code>getCellType()</code> when we make the CellType enum transition in POI 4.0. See bug 59791.
|
||||||
*/
|
*/
|
||||||
@Internal(since="POI 3.15 beta 3")
|
|
||||||
@Removal(version="4.2")
|
@Removal(version="4.2")
|
||||||
CellType getCellTypeEnum();
|
CellType getCellTypeEnum();
|
||||||
|
|
||||||
|
@ -191,6 +191,7 @@ public interface Cell {
|
||||||
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
|
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
|
||||||
* {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
|
* {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
|
||||||
* on the cached value of the formula
|
* on the cached value of the formula
|
||||||
|
* @deprecated 3.15. Will return a {@link CellType} enum in the future.
|
||||||
*/
|
*/
|
||||||
int getCachedFormulaResultType();
|
int getCachedFormulaResultType();
|
||||||
|
|
||||||
|
@ -203,7 +204,6 @@ public interface Cell {
|
||||||
* @deprecated POI 3.15 beta 3
|
* @deprecated POI 3.15 beta 3
|
||||||
* Will be renamed to <code>getCachedFormulaResultType()</code> when we make the CellType enum transition in POI 4.0. See bug 59791.
|
* Will be renamed to <code>getCachedFormulaResultType()</code> when we make the CellType enum transition in POI 4.0. See bug 59791.
|
||||||
*/
|
*/
|
||||||
@Internal(since="POI 3.15 beta 3")
|
|
||||||
CellType getCachedFormulaResultTypeEnum();
|
CellType getCachedFormulaResultTypeEnum();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,18 +17,18 @@
|
||||||
package org.apache.poi.ss.usermodel;
|
package org.apache.poi.ss.usermodel;
|
||||||
|
|
||||||
import org.apache.poi.common.usermodel.HyperlinkType;
|
import org.apache.poi.common.usermodel.HyperlinkType;
|
||||||
|
import org.apache.poi.util.Removal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An object that handles instantiating concrete
|
* An object that handles instantiating concrete
|
||||||
* classes of the various instances one needs for
|
* classes of the various instances one needs for
|
||||||
* HSSF and XSSF.
|
* HSSF and XSSF.
|
||||||
* Works around a major shortcoming in Java, where we
|
* Works around a limitation in Java where we
|
||||||
* can't have static methods on interfaces or abstract
|
* cannot have static methods on interfaces or abstract
|
||||||
* classes.
|
* classes.
|
||||||
* This allows you to get the appropriate class for
|
* This allows you to get the appropriate class for
|
||||||
* a given interface, without you having to worry
|
* a given interface, without you having to worry
|
||||||
* about if you're dealing with HSSF or XSSF, despite
|
* about if you're dealing with HSSF or XSSF.
|
||||||
* Java being quite rubbish.
|
|
||||||
*/
|
*/
|
||||||
public interface CreationHelper {
|
public interface CreationHelper {
|
||||||
/**
|
/**
|
||||||
|
@ -46,6 +46,7 @@ public interface CreationHelper {
|
||||||
* Creates a new Hyperlink, of the given type
|
* Creates a new Hyperlink, of the given type
|
||||||
* @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
|
* @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
|
||||||
*/
|
*/
|
||||||
|
@Removal(version="3.17")
|
||||||
@Deprecated
|
@Deprecated
|
||||||
Hyperlink createHyperlink(int type);
|
Hyperlink createHyperlink(int type);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue