diff options
Diffstat (limited to 'src/main/javassist/bytecode/ClassFileWriter.java')
-rw-r--r-- | src/main/javassist/bytecode/ClassFileWriter.java | 18 |
1 files changed, 18 insertions, 0 deletions
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 @@ -701,6 +701,24 @@ public class ClassFileWriter { } /** + * 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. * |