diff options
author | Javen O'Neal <onealj@apache.org> | 2015-11-29 02:18:45 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2015-11-29 02:18:45 +0000 |
commit | 80209b4d2f05a9e9149a511c161e41c149a4f685 (patch) | |
tree | 2b9c47657503a0154acacbe912b1abbb24929ec4 /src | |
parent | 644f7b6c99913db5555e284bd4327ca08c88ebc7 (diff) | |
download | poi-80209b4d2f05a9e9149a511c161e41c149a4f685.tar.gz poi-80209b4d2f05a9e9149a511c161e41c149a4f685.zip |
bug 58636: make ClientAnchor enum constructor private, make byId Internal
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717024 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/poi/ss/usermodel/ClientAnchor.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java b/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java index b781e04b91..672c1e2302 100644 --- a/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java +++ b/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java @@ -16,6 +16,8 @@ ==================================================================== */ package org.apache.poi.ss.usermodel; +import org.apache.poi.util.Internal; + /** * A client anchor is attached to an excel worksheet. It anchors against a * top-left and bottom-right cell. @@ -120,10 +122,19 @@ public interface ClientAnchor { DONT_MOVE_AND_RESIZE(3); public final short value; - AnchorType(int value) { + + // disallow non-sequential enum instance creation + private AnchorType(int value) { this.value = (short) value; } + /** + * return the AnchorType corresponding to the code + * + * @param value the anchor type code + * @return the anchor type enum + */ + @Internal public static AnchorType byId(int value) { return values()[value]; } |