aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/bytecode/ClassFileWriter.java
diff options
context:
space:
mode:
authorRich Bolen <rich.bolen@icg360.com>2019-08-20 10:52:01 -0400
committerRich Bolen <rich.bolen@icg360.com>2019-08-20 10:52:01 -0400
commitc08c21ebd2b636d6bc9e3543aaf980f9e4733a04 (patch)
tree1263c43bc116067b4968f3cc8eeedf26fca99045 /src/main/javassist/bytecode/ClassFileWriter.java
parent8f4788e0907278cec2a094af179451824651a515 (diff)
downloadjavassist-c08c21ebd2b636d6bc9e3543aaf980f9e4733a04.tar.gz
javassist-c08c21ebd2b636d6bc9e3543aaf980f9e4733a04.zip
Add support for the new Dynamic constant (17) created in java 11
Diffstat (limited to 'src/main/javassist/bytecode/ClassFileWriter.java')
-rw-r--r--src/main/javassist/bytecode/ClassFileWriter.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/main/javassist/bytecode/ClassFileWriter.java b/src/main/javassist/bytecode/ClassFileWriter.java
index 931ffcb4..03650b75 100644
--- a/src/main/javassist/bytecode/ClassFileWriter.java
+++ b/src/main/javassist/bytecode/ClassFileWriter.java
@@ -693,7 +693,7 @@ public class ClassFileWriter {
* @since 3.17.1
*/
public int addInvokeDynamicInfo(int bootstrap,
- int nameAndTypeInfo) {
+ int nameAndTypeInfo) {
output.write(InvokeDynamicInfo.tag);
output.writeShort(bootstrap);
output.writeShort(nameAndTypeInfo);
@@ -701,6 +701,24 @@ public class ClassFileWriter {
}
/**
+ * Adds a new <code>CONSTANT_InvokeDynamic_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.17.1
+ */
+ 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.
*