[jboss-cvs] javassist SVN: r692 - in trunk: src/main/javassist/bytecode and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Dec 3 05:20:12 EST 2012
Author: chiba
Date: 2012-12-03 05:20:11 -0500 (Mon, 03 Dec 2012)
New Revision: 692
Modified:
trunk/Readme.html
trunk/src/main/javassist/bytecode/ClassFileWriter.java
Log:
fixed JASSIST-182
Modified: trunk/Readme.html
===================================================================
--- trunk/Readme.html 2012-11-25 18:40:56 UTC (rev 691)
+++ trunk/Readme.html 2012-12-03 10:20:11 UTC (rev 692)
@@ -283,7 +283,7 @@
<p>-version 3.17.1
<ul>
- <li>JIRA JASSIST-177, 178
+ <li>JIRA JASSIST-177, 178, 182
</ul>
Modified: trunk/src/main/javassist/bytecode/ClassFileWriter.java
===================================================================
--- trunk/src/main/javassist/bytecode/ClassFileWriter.java 2012-11-25 18:40:56 UTC (rev 691)
+++ trunk/src/main/javassist/bytecode/ClassFileWriter.java 2012-12-03 10:20:11 UTC (rev 692)
@@ -643,6 +643,57 @@
}
/**
+ * Adds a new <code>CONSTANT_MethodHandle_info</code>
+ * structure.
+ *
+ * @param kind <code>reference_kind</code>
+ * such as {@link #REF_invokeStatic <code>REF_invokeStatic</code>}.
+ * @param index <code>reference_index</code>.
+ * @return the index of the added entry.
+ *
+ * @since 3.17.1
+ */
+ public int addMethodHandleInfo(int kind, int index) {
+ output.write(MethodHandleInfo.tag);
+ output.write(kind);
+ output.writeShort(index);
+ return num++;
+ }
+
+ /**
+ * Adds a new <code>CONSTANT_MethodType_info</code>
+ * structure.
+ *
+ * @param desc <code>descriptor_index</code>.
+ * @return the index of the added entry.
+ *
+ * @since 3.17.1
+ */
+ public int addMethodTypeInfo(int desc) {
+ output.write(MethodTypeInfo.tag);
+ output.writeShort(desc);
+ return num++;
+ }
+
+ /**
+ * Adds a new <code>CONSTANT_InvokeDynamic_info</code>
+ * structure.
+ *
+ * @param bootstrap <code>bootstrap_method_attr_index</code>.
+ * @param nameAndType <code>name_and_type_index</code>.
+ * @return the index of the added entry.
+ *
+ * @since 3.17.1
+ */
+ public int addInvokeDynamicInfo(int bootstrap,
+ int nameAndTypeInfo) {
+ output.write(InvokeDynamicInfo.tag);
+ output.writeShort(bootstrap);
+ output.writeShort(nameAndTypeInfo);
+ return num++;
+ }
+
+ /**
* Adds a new <code>CONSTANT_String_info</code>
* structure.
*
More information about the jboss-cvs-commits
mailing list