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 b4255eb3f41d542e48ca456282154b339512905b Author: Gary Gregory <[email protected]> AuthorDate: Sat Jan 10 22:50:22 2026 -0500 Javadoc --- .../org/apache/bcel/classfile/EnclosingMethod.java | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java b/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java index c8e22e11..7220d66d 100644 --- a/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java +++ b/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java @@ -74,15 +74,29 @@ public class EnclosingMethod extends Attribute { file.writeShort(methodIndex); } + /** + * Gets the enclosing class. + * + * @return the enclosing class. + */ public final ConstantClass getEnclosingClass() { return super.getConstantPool().getConstant(classIndex, Const.CONSTANT_Class, ConstantClass.class); } - // Accessors + /** + * Gets the enclosing class index. + * + * @return the enclosing class index. + */ public final int getEnclosingClassIndex() { return classIndex; } + /** + * Gets the enclosing method. + * + * @return the enclosing method. + */ public final ConstantNameAndType getEnclosingMethod() { if (methodIndex == 0) { return null; @@ -90,14 +104,29 @@ public class EnclosingMethod extends Attribute { return super.getConstantPool().getConstant(methodIndex, Const.CONSTANT_NameAndType, ConstantNameAndType.class); } + /** + * Gets the enclosing method index. + * + * @return the enclosing method index. + */ public final int getEnclosingMethodIndex() { return methodIndex; } + /** + * Sets the enclosing class index. + * + * @param idx the index. + */ public final void setEnclosingClassIndex(final int idx) { classIndex = idx; } + /** + * Sets the enclosing method index. + * + * @param idx the index. + */ public final void setEnclosingMethodIndex(final int idx) { methodIndex = idx; }
