From: chibash Date: Sun, 1 Sep 2019 15:21:32 +0000 (+0900) Subject: adds ClassFileWriter#addDynamicInfo X-Git-Tag: rel_3_26_0_ga~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf1d22fa1f2554df07801291b98f84c627fc9ef5;p=javassist.git adds ClassFileWriter#addDynamicInfo --- diff --git a/javassist.jar b/javassist.jar index 74e714ee..19969da0 100644 Binary files a/javassist.jar and b/javassist.jar differ diff --git a/src/main/javassist/bytecode/ClassFileWriter.java b/src/main/javassist/bytecode/ClassFileWriter.java index 931ffcb4..90b56086 100644 --- a/src/main/javassist/bytecode/ClassFileWriter.java +++ b/src/main/javassist/bytecode/ClassFileWriter.java @@ -700,6 +700,24 @@ public class ClassFileWriter { return num++; } + /** + * Adds a new CONSTANT_Dynamic_info + * structure. + * + * @param bootstrap bootstrap_method_attr_index. + * @param nameAndTypeInfo name_and_type_index. + * @return the index of the added entry. + * + * @since 3.26 + */ + public int addDynamicInfo(int bootstrap, + int nameAndTypeInfo) { + output.write(DynamicInfo.tag); + output.writeShort(bootstrap); + output.writeShort(nameAndTypeInfo); + return num++; + } + /** * Adds a new CONSTANT_String_info * structure.