]> source.dussan.org Git - javassist.git/commitdiff
adds ClassFileWriter#addDynamicInfo
authorchibash <chiba@javassist.org>
Sun, 1 Sep 2019 15:21:32 +0000 (00:21 +0900)
committerchibash <chiba@javassist.org>
Sun, 1 Sep 2019 15:21:32 +0000 (00:21 +0900)
javassist.jar
src/main/javassist/bytecode/ClassFileWriter.java

index 74e714ee490cedac0657f370b4ca40ed4d747433..19969da060f4eda0e2f653eaa5ee7054a1b49fae 100644 (file)
Binary files a/javassist.jar and b/javassist.jar differ
index 931ffcb48670121af6b77d536ef67c32eb121c52..90b560863c8459d26cdeea01dc36315cbb4e3a4c 100644 (file)
@@ -700,6 +700,24 @@ public class ClassFileWriter {
             return num++;
         }
 
+        /**
+         * Adds a new <code>CONSTANT_Dynamic_info</code>
+         * structure.
+         *
+         * @param bootstrap         <code>bootstrap_method_attr_index</code>.
+         * @param nameAndTypeInfo   <code>name_and_type_index</code>.
+         * @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 <code>CONSTANT_String_info</code>
          * structure.