aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/bytecode/FieldInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/javassist/bytecode/FieldInfo.java')
-rw-r--r--src/main/javassist/bytecode/FieldInfo.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/javassist/bytecode/FieldInfo.java b/src/main/javassist/bytecode/FieldInfo.java
index cbba0a85..0e2f76a5 100644
--- a/src/main/javassist/bytecode/FieldInfo.java
+++ b/src/main/javassist/bytecode/FieldInfo.java
@@ -231,6 +231,11 @@ public final class FieldInfo {
* Returns the attribute with the specified name.
* It returns null if the specified attribute is not found.
*
+ * <p>An attribute name can be obtained by, for example,
+ * {@link AnnotationsAttribute#visibleTab} or
+ * {@link AnnotationsAttribute#invisibleTab}.
+ * </p>
+ *
* @param name attribute name
* @see #getAttributes()
*/
@@ -239,6 +244,17 @@ public final class FieldInfo {
}
/**
+ * Removes an attribute with the specified name.
+ *
+ * @param name attribute name.
+ * @return the removed attribute or null.
+ * @since 3.21
+ */
+ public AttributeInfo removeAttribute(String name) {
+ return AttributeInfo.remove(attribute, name);
+ }
+
+ /**
* Appends an attribute. If there is already an attribute with
* the same name, the new one substitutes for it.
*