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 04:32:36 UTC

(commons-bcel) branch master updated (79558970 -> 80f85caf)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git


    from 79558970 Javadoc
     new 269de5f0 Javadoc
     new 6e569d6e Javadoc
     new 4c0b085d Javadoc
     new 376860af Javadoc
     new 73b41ff7 Javadoc
     new e45dabf2 Javadoc
     new fd0dd3c3 Javadoc
     new 61183b98 Javadoc
     new 80f85caf Javadoc

The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/java/org/apache/bcel/classfile/Field.java | 26 ++++++---
 src/main/java/org/apache/bcel/generic/FNEG.java    |  3 ++
 .../java/org/apache/bcel/generic/FieldGen.java     | 62 +++++++++++++++++++++-
 .../apache/bcel/generic/FieldGenOrMethodGen.java   | 44 ++++++++++++++-
 .../org/apache/bcel/generic/FieldInstruction.java  | 18 +++++--
 .../org/apache/bcel/generic/FieldObserver.java     |  5 ++
 .../org/apache/bcel/generic/FieldOrMethod.java     | 26 +++++++--
 .../org/apache/bcel/generic/NamedAndTyped.java     | 20 +++++++
 .../apache/bcel/verifier/structurals/Frame.java    | 34 +++++++++++-
 9 files changed, 218 insertions(+), 20 deletions(-)


(commons-bcel) 03/09: Javadoc

Posted by gg...@apache.org.
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 4c0b085d23d14ae3b211c4093b246df038c4e626
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 10 23:32:04 2026 -0500

    Javadoc
---
 .../java/org/apache/bcel/generic/FieldGen.java     | 62 +++++++++++++++++++++-
 1 file changed, 61 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/bcel/generic/FieldGen.java b/src/main/java/org/apache/bcel/generic/FieldGen.java
index c3812cac..8ceb3ae4 100644
--- a/src/main/java/org/apache/bcel/generic/FieldGen.java
+++ b/src/main/java/org/apache/bcel/generic/FieldGen.java
@@ -56,6 +56,8 @@ public class FieldGen extends FieldGenOrMethodGen {
     };
 
     /**
+     * Gets the comparison strategy object.
+     *
      * @return Comparison strategy object.
      */
     public static BCELComparator<FieldGen> getComparator() {
@@ -63,6 +65,8 @@ public class FieldGen extends FieldGenOrMethodGen {
     }
 
     /**
+     * Sets the comparison strategy object.
+     *
      * @param comparator Comparison strategy object.
      */
     public static void setComparator(final BCELComparator<FieldGen> comparator) {
@@ -137,6 +141,8 @@ public class FieldGen extends FieldGenOrMethodGen {
 
     /**
      * Add observer for this object.
+     *
+     * @param o the observer to add.
      */
     public void addObserver(final FieldObserver o) {
         if (observers == null) {
@@ -166,7 +172,10 @@ public class FieldGen extends FieldGenOrMethodGen {
     }
 
     /**
-     * @return deep copy of this field
+     * Creates a deep copy of this field.
+     *
+     * @param cp the constant pool.
+     * @return deep copy of this field.
      */
     public FieldGen copy(final ConstantPoolGen cp) {
         final FieldGen fg = (FieldGen) clone();
@@ -187,6 +196,8 @@ public class FieldGen extends FieldGenOrMethodGen {
 
     /**
      * Gets field object after having set up all necessary values.
+     *
+     * @return the field object.
      */
     public Field getField() {
         final String signature = getSignature();
@@ -201,6 +212,11 @@ public class FieldGen extends FieldGenOrMethodGen {
         return new Field(super.getAccessFlags(), nameIndex, signatureIndex, getAttributes(), super.getConstantPool().getConstantPool()); // sic
     }
 
+    /**
+     * Gets the initial value.
+     *
+     * @return the initial value.
+     */
     public String getInitValue() {
         return Objects.toString(value, null);
     }
@@ -223,6 +239,8 @@ public class FieldGen extends FieldGenOrMethodGen {
 
     /**
      * Remove observer for this object.
+     *
+     * @param o the observer to remove.
      */
     public void removeObserver(final FieldObserver o) {
         if (observers != null) {
@@ -230,6 +248,11 @@ public class FieldGen extends FieldGenOrMethodGen {
         }
     }
 
+    /**
+     * Sets the initial value.
+     *
+     * @param b the boolean value.
+     */
     public void setInitValue(final boolean b) {
         checkType(Type.BOOLEAN);
         if (b) {
@@ -237,6 +260,11 @@ public class FieldGen extends FieldGenOrMethodGen {
         }
     }
 
+    /**
+     * Sets the initial value.
+     *
+     * @param b the byte value.
+     */
     public void setInitValue(final byte b) {
         checkType(Type.BYTE);
         if (b != 0) {
@@ -244,6 +272,11 @@ public class FieldGen extends FieldGenOrMethodGen {
         }
     }
 
+    /**
+     * Sets the initial value.
+     *
+     * @param c the char value.
+     */
     public void setInitValue(final char c) {
         checkType(Type.CHAR);
         if (c != 0) {
@@ -251,6 +284,11 @@ public class FieldGen extends FieldGenOrMethodGen {
         }
     }
 
+    /**
+     * Sets the initial value.
+     *
+     * @param d the double value.
+     */
     public void setInitValue(final double d) {
         checkType(Type.DOUBLE);
         if (d != 0.0) {
@@ -258,6 +296,11 @@ public class FieldGen extends FieldGenOrMethodGen {
         }
     }
 
+    /**
+     * Sets the initial value.
+     *
+     * @param f the float value.
+     */
     public void setInitValue(final float f) {
         checkType(Type.FLOAT);
         if (f != 0.0) {
@@ -265,6 +308,11 @@ public class FieldGen extends FieldGenOrMethodGen {
         }
     }
 
+    /**
+     * Sets the initial value.
+     *
+     * @param i the int value.
+     */
     public void setInitValue(final int i) {
         checkType(Type.INT);
         if (i != 0) {
@@ -272,6 +320,11 @@ public class FieldGen extends FieldGenOrMethodGen {
         }
     }
 
+    /**
+     * Sets the initial value.
+     *
+     * @param l the long value.
+     */
     public void setInitValue(final long l) {
         checkType(Type.LONG);
         if (l != 0L) {
@@ -279,6 +332,11 @@ public class FieldGen extends FieldGenOrMethodGen {
         }
     }
 
+    /**
+     * Sets the initial value.
+     *
+     * @param s the short value.
+     */
     public void setInitValue(final short s) {
         checkType(Type.SHORT);
         if (s != 0) {
@@ -288,6 +346,8 @@ public class FieldGen extends FieldGenOrMethodGen {
 
     /**
      * Sets (optional) initial value of field, otherwise it will be set to null/0/false by the JVM automatically.
+     *
+     * @param str the string value.
      */
     public void setInitValue(final String str) {
         checkType(ObjectType.getInstance("java.lang.String"));


(commons-bcel) 01/09: Javadoc

Posted by gg...@apache.org.
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 269de5f0177d10b275d51085bf60db0cffc1d6a2
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 10 23:32:03 2026 -0500

    Javadoc
---
 src/main/java/org/apache/bcel/classfile/Field.java | 26 ++++++++++++++++------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/bcel/classfile/Field.java b/src/main/java/org/apache/bcel/classfile/Field.java
index 5d8ff77b..e65e366a 100644
--- a/src/main/java/org/apache/bcel/classfile/Field.java
+++ b/src/main/java/org/apache/bcel/classfile/Field.java
@@ -53,6 +53,8 @@ public final class Field extends FieldOrMethod {
     };
 
     /**
+     * Gets the comparison strategy object.
+     *
      * @return Comparison strategy object.
      */
     public static BCELComparator<Field> getComparator() {
@@ -60,6 +62,8 @@ public final class Field extends FieldOrMethod {
     }
 
     /**
+     * Sets the comparison strategy object.
+     *
      * @param comparator Comparison strategy object.
      */
     public static void setComparator(final BCELComparator<Field> comparator) {
@@ -70,6 +74,7 @@ public final class Field extends FieldOrMethod {
      * Constructs object from file stream.
      *
      * @param file Input stream.
+     * @param constantPool the constant pool.
      */
     Field(final DataInput file, final ConstantPool constantPool) throws IOException, ClassFormatException {
         super(file, constantPool);
@@ -86,11 +91,13 @@ public final class Field extends FieldOrMethod {
     }
 
     /**
-     * @param accessFlags Access rights of field
-     * @param nameIndex Points to field name in constant pool
-     * @param signatureIndex Points to encoded signature
-     * @param attributes Collection of attributes
-     * @param constantPool Array of constants
+     * Constructs a Field.
+     *
+     * @param accessFlags Access rights of field.
+     * @param nameIndex Points to field name in constant pool.
+     * @param signatureIndex Points to encoded signature.
+     * @param attributes Collection of attributes.
+     * @param constantPool Array of constants.
      */
     public Field(final int accessFlags, final int nameIndex, final int signatureIndex, final Attribute[] attributes, final ConstantPool constantPool) {
         super(accessFlags, nameIndex, signatureIndex, attributes, constantPool);
@@ -108,7 +115,10 @@ public final class Field extends FieldOrMethod {
     }
 
     /**
-     * @return deep copy of this field
+     * Creates a deep copy of this field.
+     *
+     * @param constantPool the constant pool.
+     * @return deep copy of this field.
      */
     public Field copy(final ConstantPool constantPool) {
         return (Field) copy_(constantPool);
@@ -126,7 +136,9 @@ public final class Field extends FieldOrMethod {
     }
 
     /**
-     * @return constant value associated with this field (may be null)
+     * Gets the constant value associated with this field.
+     *
+     * @return constant value associated with this field (may be null).
      */
     public ConstantValue getConstantValue() {
         for (final Attribute attribute : super.getAttributes()) {


(commons-bcel) 02/09: Javadoc

Posted by gg...@apache.org.
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 6e569d6e919fa86de426a09427899108ba02e39f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 10 23:32:04 2026 -0500

    Javadoc
---
 src/main/java/org/apache/bcel/generic/FNEG.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/main/java/org/apache/bcel/generic/FNEG.java b/src/main/java/org/apache/bcel/generic/FNEG.java
index f5628173..5fd31036 100644
--- a/src/main/java/org/apache/bcel/generic/FNEG.java
+++ b/src/main/java/org/apache/bcel/generic/FNEG.java
@@ -27,6 +27,9 @@ package org.apache.bcel.generic;
  */
 public class FNEG extends ArithmeticInstruction {
 
+    /**
+     * Constructs an FNEG instruction.
+     */
     public FNEG() {
         super(org.apache.bcel.Const.FNEG);
     }


(commons-bcel) 06/09: Javadoc

Posted by gg...@apache.org.
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 e45dabf2b93585fa06479bf9f9564cfd5265f35d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 10 23:32:04 2026 -0500

    Javadoc
---
 src/main/java/org/apache/bcel/generic/FieldObserver.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main/java/org/apache/bcel/generic/FieldObserver.java b/src/main/java/org/apache/bcel/generic/FieldObserver.java
index 6319bb63..9243fb8a 100644
--- a/src/main/java/org/apache/bcel/generic/FieldObserver.java
+++ b/src/main/java/org/apache/bcel/generic/FieldObserver.java
@@ -24,5 +24,10 @@ package org.apache.bcel.generic;
  */
 public interface FieldObserver {
 
+    /**
+     * Notifies observer of a field change.
+     *
+     * @param field the field that changed.
+     */
     void notify(FieldGen field);
 }


(commons-bcel) 07/09: Javadoc

Posted by gg...@apache.org.
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 fd0dd3c36c7b2bdfc0b8d245be11bc83e04e9ac7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 10 23:32:04 2026 -0500

    Javadoc
---
 .../org/apache/bcel/generic/FieldOrMethod.java     | 26 +++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/bcel/generic/FieldOrMethod.java b/src/main/java/org/apache/bcel/generic/FieldOrMethod.java
index 1cbbc499..2c19afff 100644
--- a/src/main/java/org/apache/bcel/generic/FieldOrMethod.java
+++ b/src/main/java/org/apache/bcel/generic/FieldOrMethod.java
@@ -38,14 +38,20 @@ public abstract class FieldOrMethod extends CPInstruction implements LoadClass {
     }
 
     /**
-     * @param index to constant pool
+     * Constructs a FieldOrMethod.
+     *
+     * @param opcode the opcode.
+     * @param index to constant pool.
      */
     protected FieldOrMethod(final short opcode, final int index) {
         super(opcode, index);
     }
 
     /**
-     * @return name of the referenced class/interface
+     * Gets the name of the referenced class/interface.
+     *
+     * @param cpg the constant pool generator.
+     * @return name of the referenced class/interface.
      * @deprecated If the instruction references an array class, this method will return "java.lang.Object". For code
      *             generated by Java 1.5, this answer is sometimes wrong (for example, if the "clone()" method is called on an
      *             array). A better idea is to use the {@link #getReferenceType(ConstantPoolGen)} method, which correctly
@@ -64,7 +70,10 @@ public abstract class FieldOrMethod extends CPInstruction implements LoadClass {
     }
 
     /**
-     * @return type of the referenced class/interface
+     * Gets the type of the referenced class/interface.
+     *
+     * @param cpg the constant pool generator.
+     * @return type of the referenced class/interface.
      * @deprecated If the instruction references an array class, the ObjectType returned will be invalid. Use
      *             getReferenceType() instead.
      */
@@ -76,8 +85,9 @@ public abstract class FieldOrMethod extends CPInstruction implements LoadClass {
     /**
      * Gets the ObjectType of the method return or field.
      *
-     * @return type of the referenced class/interface
-     * @throws ClassGenException when the field is (or method returns) an array,
+     * @param cpg the constant pool generator.
+     * @return type of the referenced class/interface.
+     * @throws ClassGenException when the field is (or method returns) an array.
      */
     @Override
     public ObjectType getLoadClassType(final ConstantPoolGen cpg) {
@@ -92,6 +102,9 @@ public abstract class FieldOrMethod extends CPInstruction implements LoadClass {
     }
 
     /**
+     * Gets the name of referenced method or field.
+     *
+     * @param cpg the constant pool generator.
      * @return name of referenced method/field.
      */
     public String getName(final ConstantPoolGen cpg) {
@@ -120,6 +133,9 @@ public abstract class FieldOrMethod extends CPInstruction implements LoadClass {
     }
 
     /**
+     * Gets the signature of referenced method or field.
+     *
+     * @param cpg the constant pool generator.
      * @return signature of referenced method/field.
      */
     public String getSignature(final ConstantPoolGen cpg) {


(commons-bcel) 05/09: Javadoc

Posted by gg...@apache.org.
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 73b41ff7f060101425b3c1b6a1ed925d8ab0fbac
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 10 23:32:04 2026 -0500

    Javadoc
---
 .../java/org/apache/bcel/generic/FieldInstruction.java | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/bcel/generic/FieldInstruction.java b/src/main/java/org/apache/bcel/generic/FieldInstruction.java
index 4bc05d8c..f46ec04a 100644
--- a/src/main/java/org/apache/bcel/generic/FieldInstruction.java
+++ b/src/main/java/org/apache/bcel/generic/FieldInstruction.java
@@ -32,13 +32,19 @@ public abstract class FieldInstruction extends FieldOrMethod {
     }
 
     /**
-     * @param index to constant pool
+     * Constructs a FieldInstruction.
+     *
+     * @param opcode the opcode.
+     * @param index to constant pool.
      */
     protected FieldInstruction(final short opcode, final int index) {
         super(opcode, index);
     }
 
     /**
+     * Gets the name of referenced field.
+     *
+     * @param cpg the constant pool generator.
      * @return name of referenced field.
      */
     public String getFieldName(final ConstantPoolGen cpg) {
@@ -46,14 +52,20 @@ public abstract class FieldInstruction extends FieldOrMethod {
     }
 
     /**
-     * @return size of field (1 or 2)
+     * Gets the size of field.
+     *
+     * @param cpg the constant pool generator.
+     * @return size of field (1 or 2).
      */
     protected int getFieldSize(final ConstantPoolGen cpg) {
         return Type.size(Type.getTypeSize(getSignature(cpg)));
     }
 
     /**
-     * @return type of field
+     * Gets the type of field.
+     *
+     * @param cpg the constant pool generator.
+     * @return type of field.
      */
     public Type getFieldType(final ConstantPoolGen cpg) {
         return Type.getType(getSignature(cpg));


(commons-bcel) 09/09: Javadoc

Posted by gg...@apache.org.
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 80f85cafb6d5f82160a87fd602ffa84bce2ef753
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 10 23:32:05 2026 -0500

    Javadoc
---
 .../apache/bcel/verifier/structurals/Frame.java    | 34 ++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/bcel/verifier/structurals/Frame.java b/src/main/java/org/apache/bcel/verifier/structurals/Frame.java
index 74c87fa5..d126224c 100644
--- a/src/main/java/org/apache/bcel/verifier/structurals/Frame.java
+++ b/src/main/java/org/apache/bcel/verifier/structurals/Frame.java
@@ -34,7 +34,9 @@ public class Frame {
     protected static UninitializedObjectType _this;
 
     /**
-     * @return the _this
+     * Gets the static _this reference.
+     *
+     * @return the _this.
      * @since 6.0
      */
     public static UninitializedObjectType getThis() {
@@ -42,7 +44,9 @@ public class Frame {
     }
 
     /**
-     * @param _this the _this to set
+     * Sets the static _this reference.
+     *
+     * @param _this the _this to set.
      * @since 6.0
      */
     public static void setThis(final UninitializedObjectType _this) {
@@ -50,14 +54,20 @@ public class Frame {
     }
 
     /**
+     * The local variables.
      */
     private final LocalVariables locals;
 
     /**
+     * The operand stack.
      */
     private final OperandStack stack;
 
     /**
+     * Constructs a Frame.
+     *
+     * @param maxLocals the maximum number of local variables.
+     * @param maxStack the maximum stack size.
      */
     public Frame(final int maxLocals, final int maxStack) {
         locals = new LocalVariables(maxLocals);
@@ -65,6 +75,10 @@ public class Frame {
     }
 
     /**
+     * Constructs a Frame.
+     *
+     * @param locals the local variables.
+     * @param stack the operand stack.
      */
     public Frame(final LocalVariables locals, final OperandStack stack) {
         this.locals = locals;
@@ -72,6 +86,9 @@ public class Frame {
     }
 
     /**
+     * Creates a clone of this frame.
+     *
+     * @return a clone of this frame.
      */
     @Override
     protected Object clone() {
@@ -79,6 +96,10 @@ public class Frame {
     }
 
     /**
+     * Checks if this frame equals another object.
+     *
+     * @param o the object to compare.
+     * @return true if equal, false otherwise.
      */
     @Override
     public boolean equals(final Object o) {
@@ -90,18 +111,27 @@ public class Frame {
     }
 
     /**
+     * Gets a clone of this frame.
+     *
+     * @return a clone of this frame.
      */
     public Frame getClone() {
         return (Frame) clone();
     }
 
     /**
+     * Gets the local variables.
+     *
+     * @return the local variables.
      */
     public LocalVariables getLocals() {
         return locals;
     }
 
     /**
+     * Gets the operand stack.
+     *
+     * @return the operand stack.
      */
     public OperandStack getStack() {
         return stack;


(commons-bcel) 08/09: Javadoc

Posted by gg...@apache.org.
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 61183b98f50cfc343450d3e1ff09d4a61f30e629
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 10 23:32:05 2026 -0500

    Javadoc
---
 .../java/org/apache/bcel/generic/NamedAndTyped.java  | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/main/java/org/apache/bcel/generic/NamedAndTyped.java b/src/main/java/org/apache/bcel/generic/NamedAndTyped.java
index 95c0e97e..166568fe 100644
--- a/src/main/java/org/apache/bcel/generic/NamedAndTyped.java
+++ b/src/main/java/org/apache/bcel/generic/NamedAndTyped.java
@@ -23,11 +23,31 @@ package org.apache.bcel.generic;
  */
 public interface NamedAndTyped {
 
+    /**
+     * Gets the name.
+     *
+     * @return the name.
+     */
     String getName();
 
+    /**
+     * Gets the type.
+     *
+     * @return the type.
+     */
     Type getType();
 
+    /**
+     * Sets the name.
+     *
+     * @param name the name.
+     */
     void setName(String name);
 
+    /**
+     * Sets the type.
+     *
+     * @param type the type.
+     */
     void setType(Type type);
 }


(commons-bcel) 04/09: Javadoc

Posted by gg...@apache.org.
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 376860af65c6661ed6bd3b473ddd7f645d529d15
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 10 23:32:04 2026 -0500

    Javadoc
---
 .../apache/bcel/generic/FieldGenOrMethodGen.java   | 44 +++++++++++++++++++++-
 1 file changed, 42 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java b/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
index 914de40f..7bd9f2d0 100644
--- a/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
+++ b/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
@@ -54,16 +54,27 @@ public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAn
     // @since 6.0
     private final List<AnnotationEntryGen> annotationList = new ArrayList<>();
 
+    /**
+     * Constructs a FieldGenOrMethodGen.
+     */
     protected FieldGenOrMethodGen() {
     }
 
     /**
+     * Constructs a FieldGenOrMethodGen.
+     *
+     * @param accessFlags the access flags.
      * @since 6.0
      */
     protected FieldGenOrMethodGen(final int accessFlags) { // TODO could this be package protected?
         super(accessFlags);
     }
 
+    /**
+     * Adds all attributes from an array.
+     *
+     * @param attributes the attributes to add.
+     */
     protected void addAll(final Attribute[] attributes) {
         if (attributes != null) {
             Collections.addAll(attributeList, attributes);
@@ -71,6 +82,9 @@ public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAn
     }
 
     /**
+     * Adds an annotation entry.
+     *
+     * @param ag the annotation entry.
      * @since 6.0
      */
     public void addAnnotationEntry(final AnnotationEntryGen ag) {
@@ -96,17 +110,29 @@ public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAn
         }
     }
 
+    /**
+     * Gets all annotation entries.
+     *
+     * @return all annotation entries.
+     */
     public AnnotationEntryGen[] getAnnotationEntries() {
         return annotationList.toArray(AnnotationEntryGen.EMPTY_ARRAY);
     }
 
     /**
+     * Gets all attributes of this method or field.
+     *
      * @return all attributes of this method.
      */
     public Attribute[] getAttributes() {
         return attributeList.toArray(Attribute.EMPTY_ARRAY);
     }
 
+    /**
+     * Gets the constant pool.
+     *
+     * @return the constant pool.
+     */
     public ConstantPoolGen getConstantPool() {
         return cp;
     }
@@ -120,6 +146,8 @@ public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAn
     }
 
     /**
+     * Gets the signature of method or field.
+     *
      * @return signature of method/field.
      */
     public abstract String getSignature();
@@ -130,6 +158,8 @@ public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAn
     }
 
     /**
+     * Removes all annotation entries.
+     *
      * @since 6.0
      */
     public void removeAnnotationEntries() {
@@ -137,6 +167,9 @@ public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAn
     }
 
     /**
+     * Removes an annotation entry.
+     *
+     * @param ag the annotation entry to remove.
      * @since 6.0
      */
     public void removeAnnotationEntry(final AnnotationEntryGen ag) {
@@ -144,19 +177,26 @@ public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAn
     }
 
     /**
-     * Remove an attribute.
+     * Removes an attribute.
+     *
+     * @param a the attribute to remove.
      */
     public void removeAttribute(final Attribute a) {
         attributeList.remove(a);
     }
 
     /**
-     * Remove all attributes.
+     * Removes all attributes.
      */
     public void removeAttributes() {
         attributeList.clear();
     }
 
+    /**
+     * Sets the constant pool.
+     *
+     * @param cp the constant pool.
+     */
     public void setConstantPool(final ConstantPoolGen cp) { // TODO could be package-protected?
         this.cp = cp;
     }