You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2026/01/11 03:51:23 UTC
(commons-bcel) 37/47: Javadoc
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
commit 1fa5afc32da2c1fbd7c5288aa6d4fb282b5ee1eb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 10 22:50:22 2026 -0500
Javadoc
---
.../apache/bcel/classfile/EnumElementValue.java | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/src/main/java/org/apache/bcel/classfile/EnumElementValue.java b/src/main/java/org/apache/bcel/classfile/EnumElementValue.java
index 0fafd791..7924ef10 100644
--- a/src/main/java/org/apache/bcel/classfile/EnumElementValue.java
+++ b/src/main/java/org/apache/bcel/classfile/EnumElementValue.java
@@ -32,6 +32,14 @@ public class EnumElementValue extends ElementValue {
private final int valueIdx;
+ /**
+ * Constructs an EnumElementValue.
+ *
+ * @param type the element value type.
+ * @param typeIdx the type index.
+ * @param valueIdx the value index.
+ * @param cpool the constant pool.
+ */
public EnumElementValue(final int type, final int typeIdx, final int valueIdx, final ConstantPool cpool) {
super(type, cpool);
if (type != ENUM_CONSTANT) {
@@ -48,18 +56,38 @@ public class EnumElementValue extends ElementValue {
dos.writeShort(valueIdx); // u2
}
+ /**
+ * Gets the enum type string.
+ *
+ * @return the enum type string.
+ */
public String getEnumTypeString() {
return super.getConstantPool().getConstantUtf8(typeIdx).getBytes();
}
+ /**
+ * Gets the enum value string.
+ *
+ * @return the enum value string.
+ */
public String getEnumValueString() {
return super.getConstantPool().getConstantUtf8(valueIdx).getBytes();
}
+ /**
+ * Gets the type index.
+ *
+ * @return the type index.
+ */
public int getTypeIndex() {
return typeIdx;
}
+ /**
+ * Gets the value index.
+ *
+ * @return the value index.
+ */
public int getValueIndex() {
return valueIdx;
}