diff options
author | chibash <chiba@javassist.org> | 2016-09-29 20:43:05 +0900 |
---|---|---|
committer | chibash <chiba@javassist.org> | 2016-09-29 20:43:05 +0900 |
commit | 5ea5b6695cf3ecb9896b9e9ce02f089b893101a4 (patch) | |
tree | 52997d8c299d2774c05d755e745013a630c16431 /src/main/javassist/bytecode/ClassFile.java | |
parent | fb93ae8b8f6e0646ed9b95d4d8d0abe77d601a62 (diff) | |
parent | 0e9ff9fd2bdf9ae928c7596714672a2baec01281 (diff) | |
download | javassist-test/java9-jigsaw.tar.gz javassist-test/java9-jigsaw.zip |
Merge branch 'master' into test/java9-jigsawtest/java9-jigsaw
Diffstat (limited to 'src/main/javassist/bytecode/ClassFile.java')
-rw-r--r-- | src/main/javassist/bytecode/ClassFile.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/javassist/bytecode/ClassFile.java b/src/main/javassist/bytecode/ClassFile.java index 9e7729fd..e48b8e04 100644 --- a/src/main/javassist/bytecode/ClassFile.java +++ b/src/main/javassist/bytecode/ClassFile.java @@ -771,6 +771,11 @@ public final class ClassFile { * Returns the attribute with the specified name. If there are multiple * attributes with that name, this method returns either of them. It * returns null if the specified attributed 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() @@ -788,6 +793,17 @@ public final class ClassFile { } /** + * 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(attributes, name); + } + + /** * Appends an attribute. If there is already an attribute with the same * name, the new one substitutes for it. * |