changeset 13591:d78919a39b77

8141615: Add new public methods to sun.reflect.ConstantPool Reviewed-by: twisti, iignatyev, coleenp
author kshefov
date Tue, 12 Jan 2016 17:03:06 +0300
parents f195b5a4dc07
children 306ce485bdad
files make/mapfiles/libjava/mapfile-vers src/java.base/share/classes/sun/reflect/ConstantPool.java src/java.base/share/native/include/jvm.h src/java.base/share/native/libjava/ConstantPool.c test/sun/reflect/constantPool/ConstantPoolTest.java test/sun/reflect/constantPool/ConstantPoolTestDummy.jasm
diffstat 6 files changed, 363 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/mapfiles/libjava/mapfile-vers	Mon Jan 11 17:12:01 2016 -0800
+++ b/make/mapfiles/libjava/mapfile-vers	Tue Jan 12 17:03:06 2016 +0300
@@ -251,6 +251,7 @@
 		Java_sun_misc_Signal_raise0;
               Java_sun_reflect_ConstantPool_getClassAt0;
               Java_sun_reflect_ConstantPool_getClassAtIfLoaded0;
+              Java_sun_reflect_ConstantPool_getClassRefIndexAt0;
               Java_sun_reflect_ConstantPool_getDoubleAt0;
               Java_sun_reflect_ConstantPool_getFieldAt0;
               Java_sun_reflect_ConstantPool_getFieldAtIfLoaded0;
@@ -260,8 +261,11 @@
               Java_sun_reflect_ConstantPool_getMemberRefInfoAt0;
               Java_sun_reflect_ConstantPool_getMethodAt0;
               Java_sun_reflect_ConstantPool_getMethodAtIfLoaded0;
+              Java_sun_reflect_ConstantPool_getNameAndTypeRefIndexAt0;
+              Java_sun_reflect_ConstantPool_getNameAndTypeRefInfoAt0;
               Java_sun_reflect_ConstantPool_getSize0;
               Java_sun_reflect_ConstantPool_getStringAt0;
+              Java_sun_reflect_ConstantPool_getTagAt0;
               Java_sun_reflect_ConstantPool_getUTF8At0;
 		Java_java_io_Console_istty;
 		Java_java_io_Console_encoding;
--- a/src/java.base/share/classes/sun/reflect/ConstantPool.java	Mon Jan 11 17:12:01 2016 -0800
+++ b/src/java.base/share/classes/sun/reflect/ConstantPool.java	Tue Jan 12 17:03:06 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,10 @@
   public int      getSize()                      { return getSize0            (constantPoolOop);        }
   public Class<?> getClassAt         (int index) { return getClassAt0         (constantPoolOop, index); }
   public Class<?> getClassAtIfLoaded (int index) { return getClassAtIfLoaded0 (constantPoolOop, index); }
+  // Returns a class reference index for a method or a field.
+  public int getClassRefIndexAt(int index) {
+      return getClassRefIndexAt0(constantPoolOop, index);
+  }
   // Returns either a Method or Constructor.
   // Static initializers are returned as Method objects.
   public Member   getMethodAt        (int index) { return getMethodAt0        (constantPoolOop, index); }
@@ -45,13 +49,56 @@
   // Fetches the class name, member (field, method or interface
   // method) name, and type descriptor as an array of three Strings
   public String[] getMemberRefInfoAt (int index) { return getMemberRefInfoAt0 (constantPoolOop, index); }
+  // Returns a name and type reference index for a method, a field or an invokedynamic.
+  public int getNameAndTypeRefIndexAt(int index) {
+      return getNameAndTypeRefIndexAt0(constantPoolOop, index);
+  }
+  // Fetches the name and type from name_and_type index as an array of two Strings
+  public String[] getNameAndTypeRefInfoAt(int index) {
+      return getNameAndTypeRefInfoAt0(constantPoolOop, index);
+  }
   public int      getIntAt           (int index) { return getIntAt0           (constantPoolOop, index); }
   public long     getLongAt          (int index) { return getLongAt0          (constantPoolOop, index); }
   public float    getFloatAt         (int index) { return getFloatAt0         (constantPoolOop, index); }
   public double   getDoubleAt        (int index) { return getDoubleAt0        (constantPoolOop, index); }
   public String   getStringAt        (int index) { return getStringAt0        (constantPoolOop, index); }
   public String   getUTF8At          (int index) { return getUTF8At0          (constantPoolOop, index); }
+  public Tag getTagAt(int index) {
+      return Tag.valueOf(getTagAt0(constantPoolOop, index));
+  }
 
+  public static enum Tag {
+      UTF8(1),
+      INTEGER(3),
+      FLOAT(4),
+      LONG(5),
+      DOUBLE(6),
+      CLASS(7),
+      STRING(8),
+      FIELDREF(9),
+      METHODREF(10),
+      INTERFACEMETHODREF(11),
+      NAMEANDTYPE(12),
+      METHODHANDLE(15),
+      METHODTYPE(16),
+      INVOKEDYNAMIC(18),
+      INVALID(0);
+
+      private final int tagCode;
+
+      private Tag(int tagCode) {
+          this.tagCode = tagCode;
+      }
+
+      private static Tag valueOf(byte v) {
+          for (Tag tag : Tag.values()) {
+              if (tag.tagCode == v) {
+                  return tag;
+              }
+          }
+          throw new IllegalArgumentException("Unknown constant pool tag code " + v);
+      }
+   }
   //---------------------------------------------------------------------------
   // Internals only below this point
   //
@@ -66,15 +113,19 @@
   private native int      getSize0            (Object constantPoolOop);
   private native Class<?> getClassAt0         (Object constantPoolOop, int index);
   private native Class<?> getClassAtIfLoaded0 (Object constantPoolOop, int index);
+  private native int      getClassRefIndexAt0 (Object constantPoolOop, int index);
   private native Member   getMethodAt0        (Object constantPoolOop, int index);
   private native Member   getMethodAtIfLoaded0(Object constantPoolOop, int index);
   private native Field    getFieldAt0         (Object constantPoolOop, int index);
   private native Field    getFieldAtIfLoaded0 (Object constantPoolOop, int index);
   private native String[] getMemberRefInfoAt0 (Object constantPoolOop, int index);
+  private native int      getNameAndTypeRefIndexAt0(Object constantPoolOop, int index);
+  private native String[] getNameAndTypeRefInfoAt0(Object constantPoolOop, int index);
   private native int      getIntAt0           (Object constantPoolOop, int index);
   private native long     getLongAt0          (Object constantPoolOop, int index);
   private native float    getFloatAt0         (Object constantPoolOop, int index);
   private native double   getDoubleAt0        (Object constantPoolOop, int index);
   private native String   getStringAt0        (Object constantPoolOop, int index);
   private native String   getUTF8At0          (Object constantPoolOop, int index);
+  private native byte     getTagAt0           (Object constantPoolOop, int index);
 }
--- a/src/java.base/share/native/include/jvm.h	Mon Jan 11 17:12:01 2016 -0800
+++ b/src/java.base/share/native/include/jvm.h	Tue Jan 12 17:03:06 2016 +0300
@@ -63,7 +63,7 @@
  *    class.
  */
 
-#define JVM_INTERFACE_VERSION 4
+#define JVM_INTERFACE_VERSION 5
 
 JNIEXPORT jint JNICALL
 JVM_GetInterfaceVersion(void);
@@ -502,6 +502,9 @@
 JNIEXPORT jclass JNICALL JVM_ConstantPoolGetClassAtIfLoaded
 (JNIEnv *env, jobject unused, jobject jcpool, jint index);
 
+JNIEXPORT jint JNICALL JVM_ConstantPoolGetClassRefIndexAt
+(JNIEnv *env, jobject obj, jobject unused, jint index);
+
 JNIEXPORT jobject JNICALL JVM_ConstantPoolGetMethodAt
 (JNIEnv *env, jobject unused, jobject jcpool, jint index);
 
@@ -517,6 +520,12 @@
 JNIEXPORT jobjectArray JNICALL JVM_ConstantPoolGetMemberRefInfoAt
 (JNIEnv *env, jobject unused, jobject jcpool, jint index);
 
+JNIEXPORT jint JNICALL JVM_ConstantPoolGetNameAndTypeRefIndexAt
+(JNIEnv *env, jobject obj, jobject unused, jint index);
+
+JNIEXPORT jobjectArray JNICALL JVM_ConstantPoolGetNameAndTypeRefInfoAt
+(JNIEnv *env, jobject obj, jobject unused, jint index);
+
 JNIEXPORT jint JNICALL JVM_ConstantPoolGetIntAt
 (JNIEnv *env, jobject unused, jobject jcpool, jint index);
 
@@ -535,6 +544,9 @@
 JNIEXPORT jstring JNICALL JVM_ConstantPoolGetUTF8At
 (JNIEnv *env, jobject unused, jobject jcpool, jint index);
 
+JNIEXPORT jbyte JNICALL JVM_ConstantPoolGetTagAt
+(JNIEnv *env, jobject unused, jobject jcpool, jint index);
+
 /*
  * Parameter reflection
  */
--- a/src/java.base/share/native/libjava/ConstantPool.c	Mon Jan 11 17:12:01 2016 -0800
+++ b/src/java.base/share/native/libjava/ConstantPool.c	Tue Jan 12 17:03:06 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,6 +44,12 @@
   return JVM_ConstantPoolGetClassAtIfLoaded(env, unused, jcpool, index);
 }
 
+JNIEXPORT jint JNICALL Java_sun_reflect_ConstantPool_getClassRefIndexAt0
+(JNIEnv *env, jobject unused, jobject jcpool, jint index)
+{
+    return JVM_ConstantPoolGetClassRefIndexAt(env, unused, jcpool, index);
+}
+
 JNIEXPORT jobject JNICALL Java_sun_reflect_ConstantPool_getMethodAt0
 (JNIEnv *env, jobject unused, jobject jcpool, jint index)
 {
@@ -74,6 +80,18 @@
   return JVM_ConstantPoolGetMemberRefInfoAt(env, unused, jcpool, index);
 }
 
+JNIEXPORT jint JNICALL Java_sun_reflect_ConstantPool_getNameAndTypeRefIndexAt0
+(JNIEnv *env, jobject unused, jobject jcpool, jint index)
+{
+    return JVM_ConstantPoolGetNameAndTypeRefIndexAt(env, unused, jcpool, index);
+}
+
+JNIEXPORT jobjectArray JNICALL Java_sun_reflect_ConstantPool_getNameAndTypeRefInfoAt0
+(JNIEnv *env, jobject unused, jobject jcpool, jint index)
+{
+  return JVM_ConstantPoolGetNameAndTypeRefInfoAt(env, unused, jcpool, index);
+}
+
 JNIEXPORT jint JNICALL Java_sun_reflect_ConstantPool_getIntAt0
 (JNIEnv *env, jobject unused, jobject jcpool, jint index)
 {
@@ -109,3 +127,10 @@
 {
   return JVM_ConstantPoolGetUTF8At(env, unused, jcpool, index);
 }
+
+JNIEXPORT jbyte JNICALL Java_sun_reflect_ConstantPool_getTagAt0
+(JNIEnv *env, jobject unused, jobject jcpool, jint index)
+{
+  return JVM_ConstantPoolGetTagAt(env, unused, jcpool, index);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/reflect/constantPool/ConstantPoolTest.java	Tue Jan 12 17:03:06 2016 +0300
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8141615
+ * @summary Tests new public methods at sun.reflect.ConstantPool
+ * @modules java.base/sun.reflect
+ * @library /lib/testlibrary
+ * @compile ConstantPoolTestDummy.jasm
+ * @run main sun.reflect.constantPool.ConstantPoolTest
+ */
+
+package sun.reflect.constantPool;
+
+import java.util.HashMap;
+import java.util.Map;
+import jdk.internal.misc.SharedSecrets;
+import jdk.testlibrary.Asserts;
+import sun.reflect.ConstantPool;
+
+public class ConstantPoolTest {
+
+    private static final Class<?> TEST_CLASS = ConstantPoolTestDummy.class;
+    private static final ConstantPool CP = SharedSecrets.getJavaLangAccess()
+            .getConstantPool(TEST_CLASS);
+
+    public static void main(String[] s) {
+        for (TestCase testCase : TestCase.values()) {
+            testCase.test();
+        }
+    }
+
+    public static enum TestCase {
+        GET_TAG_AT {
+            {
+                referenceMap.put(1, ConstantPool.Tag.METHODREF);
+                referenceMap.put(2, ConstantPool.Tag.CLASS);
+                referenceMap.put(4, ConstantPool.Tag.UTF8);
+                referenceMap.put(10, ConstantPool.Tag.NAMEANDTYPE);
+                referenceMap.put(13, ConstantPool.Tag.LONG);
+                referenceMap.put(15, ConstantPool.Tag.INTEGER);
+                referenceMap.put(16, ConstantPool.Tag.INTERFACEMETHODREF);
+                referenceMap.put(21, ConstantPool.Tag.DOUBLE);
+                referenceMap.put(23, ConstantPool.Tag.STRING);
+                referenceMap.put(25, ConstantPool.Tag.INVOKEDYNAMIC);
+                referenceMap.put(29, ConstantPool.Tag.METHODHANDLE);
+                referenceMap.put(30, ConstantPool.Tag.METHODTYPE);
+                referenceMap.put(48, ConstantPool.Tag.FIELDREF);
+                referenceMap.put(52, ConstantPool.Tag.FLOAT);
+            }
+            @Override
+            void testIndex(int cpi, Object reference) {
+                ConstantPool.Tag tagToVerify = CP.getTagAt(cpi);
+                ConstantPool.Tag tagToRefer = (ConstantPool.Tag) reference;
+                String msg = String.format("Method getTagAt works not as expected"
+                        + "at CP entry #%d: got CP tag %s, but should be %s",
+                        cpi, tagToVerify.name(), tagToRefer.name());
+                Asserts.assertEquals(tagToVerify, tagToRefer, msg);
+            }
+        },
+        GET_CLASS_REF_INDEX_AT {
+            {
+                referenceMap.put(1, 3);
+                referenceMap.put(16, 17);
+                referenceMap.put(32, 35);
+                referenceMap.put(34, 3);
+                referenceMap.put(48, 2);
+            }
+            @Override
+            void testIndex(int cpi, Object reference) {
+                int indexToVerify = CP.getClassRefIndexAt(cpi);
+                int indexToRefer = (int) reference;
+                String msg = String.format("Method getClassRefIndexAt works not"
+                        + " as expected at CP entry #%d:"
+                        + " got index %d, but should be %d",
+                        cpi, indexToVerify, indexToRefer);
+                Asserts.assertEquals(indexToVerify, indexToRefer, msg);
+            }
+        },
+        GET_NAME_AND_TYPE_REF_INDEX_AT {
+            {
+                referenceMap.put(1, 10);
+                referenceMap.put(16, 18);
+                referenceMap.put(25, 26);
+                referenceMap.put(32, 36);
+                referenceMap.put(34, 37);
+                referenceMap.put(48, 49);
+            }
+            @Override
+            void testIndex(int cpi, Object reference) {
+                int indexToRefer = (int) reference;
+                int indexToVerify = CP.getNameAndTypeRefIndexAt(cpi);
+                String msg = String.format("Method getNameAndTypeRefIndexAt works"
+                        + " not as expected at CP entry #%d:"
+                        + " got index %d, but should be %d",
+                        cpi, indexToVerify, indexToRefer);
+                Asserts.assertEquals(indexToVerify, indexToRefer, msg);
+            }
+        },
+        GET_NAME_AND_TYPE_REF_INFO_AT {
+            {
+                referenceMap.put(10, new String[]{"<init>", "()V"});
+                referenceMap.put(18, new String[]{"run", "()V"});
+                referenceMap.put(26, new String[]{"accept", "()Ljava/util/function/Consumer;"});
+                referenceMap.put(36, new String[]{"metafactory",
+                        "(Ljava/lang/invoke/MethodHandles$Lookup;"
+                        + "Ljava/lang/String;Ljava/lang/invoke/MethodType;"
+                        + "Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;"
+                        + "Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"});
+                referenceMap.put(37, new String[]{"toString", "()Ljava/lang/String;"});
+                referenceMap.put(49, new String[]{"myField", "I"});
+            }
+            @Override
+            void testIndex(int cpi, Object reference) {
+                String[] natInfo = CP.getNameAndTypeRefInfoAt(cpi);
+                String msg = String.format("Method getNameAndTypeRefInfoAt"
+                        + " works not as expected at CP entry #%d:"
+                        + " returned value should not be null", cpi);
+                Asserts.assertNotNull(natInfo, msg);
+                String[] castedReference = (String[]) reference;
+                int natInfoLength = natInfo.length;
+                msg = String.format("Method getNameAndTypeRefInfoAt"
+                        + " works not as expected at CP entry #%d:"
+                        + " length of the returned string array is %d, but should be 2",
+                        cpi, natInfoLength);
+                Asserts.assertEquals(natInfoLength, 2, msg);
+                String[] nameOrType = new String[]{"name", "type"};
+                for (int i = 0; i < 2; i++) {
+                    String infoToVerify = natInfo[i];
+                    String infoToRefer = castedReference[i];
+                    msg = String.format("Method getNameAndTypeRefInfoAt"
+                            + " works not as expected at CP entry #%d:"
+                            + " got %s info %s, but should be %s",
+                            cpi, nameOrType[i], infoToVerify, infoToRefer);
+                    Asserts.assertEquals(infoToVerify, infoToRefer, msg);
+                }
+            }
+        };
+
+        protected final Map<Integer, Object> referenceMap;
+        TestCase() {
+            this.referenceMap = new HashMap<>();
+        }
+        abstract void testIndex(int cpi, Object reference);
+        public void test() {
+            referenceMap.forEach(this::testIndex);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/reflect/constantPool/ConstantPoolTestDummy.jasm	Tue Jan 12 17:03:06 2016 +0300
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package  sun/reflect/constantPool;
+
+super public    #2; //class ConstantPoolTestDummy
+    version 52:0
+{
+
+// Actually, only first 13 constant pool entries are actually used by the class
+// and its methods. All the rest are added just for the testing of getTagAt method
+// and getNameAndTypeRefIndexAt method.
+
+const #1 = Method   #3.#10; //  java/lang/Object."<init>":"()V"
+const #2 = class    #11;    //  ConstantPoolTestDummy
+const #3 = class    #12;    //  java/lang/Object
+const #4 = Asciz    "<init>";
+const #5 = Asciz    "()V";
+const #6 = Asciz    "Code";
+const #7 = Asciz    "LineNumberTable";
+const #8 = Asciz    "SourceFile";
+const #9 = Asciz    "ConstantPoolTestDummy.java";
+const #10 = NameAndType #4:#5;  //  "<init>":"()V"
+const #11 = Asciz   "sun/reflect/constantPool/ConstantPoolTestDummy";
+const #12 = Asciz   "java/lang/Object";
+const #13 = long    6l;
+const #15 = int     1;
+const #16 = InterfaceMethod #17.#18;    //  java/lang/Runnable.run:"()V"
+const #17 = class   #19;    //  java/lang/Runnable
+const #18 = NameAndType #20:#5;    //  run:"()V"
+const #19 = Asciz   "java/lang/Runnable";
+const #20 = Asciz   "run";
+const #21 = double   1.45d;
+const #23 = String   #24;    //  "Hello"
+const #24 = Asciz   "Hello";
+const #25 = InvokeDynamic   0:#26;  //  REF_invokeStatic:java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;":accept:"()Ljava/util/function/Consumer;" MethodType "(Ljava/lang/Object;)V", MethodHandle REF_invokeVirtual:java/lang/Object.toString:"()Ljava/lang/String;", MethodType "(Ljava/lang/Object;)V"
+const #26 = NameAndType #27:#28;    //  accept:"()Ljava/util/function/Consumer;"
+const #27 = Asciz   "accept";
+const #28 = Asciz   "()Ljava/util/function/Consumer;";
+const #29 = MethodHandle    6:#32;  //  REF_invokeStatic:java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"
+const #30 = MethodType  #33;    //  "(Ljava/lang/Object;)V"
+const #31 = MethodHandle    5:#34;  //  REF_invokeVirtual:java/lang/Object.toString:"()Ljava/lang/String;"
+const #32 = Method  #35.#36;    //  java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"
+const #33 = Asciz   "(Ljava/lang/Object;)V";
+const #34 = Method  #3.#37; //  java/lang/Object.toString:"()Ljava/lang/String;"
+const #35 = class   #38;    //  java/lang/invoke/LambdaMetafactory
+const #36 = NameAndType #39:#40;    //  metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"
+const #37 = NameAndType #41:#42;    //  toString:"()Ljava/lang/String;"
+const #38 = Asciz   "java/lang/invoke/LambdaMetafactory";
+const #39 = Asciz   "metafactory";
+const #40 = Asciz   "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;";
+const #41 = Asciz   "toString";
+const #42 = Asciz   "()Ljava/lang/String;";
+const #43 = class   #46;    //  java/lang/invoke/MethodHandles$Lookup
+const #44 = Asciz   "Lookup";
+const #45 = class   #47;    //  java/lang/invoke/MethodHandles
+const #46 = Asciz   "java/lang/invoke/MethodHandles$Lookup";
+const #47 = Asciz   "java/lang/invoke/MethodHandles";
+const #48 = Field    #2.#49;    //  sun/reflect/constantPool/ConstantPoolTestDummy.myField:"I"
+const #49 = NameAndType #50:#51;    //  myField:"I"
+const #50 = Asciz   "myField";
+const #51 = Asciz   "I";
+const #52 = float   1.34f;
+
+public Method #4:#5  // "<init>":"()V"
+
+    stack 1 locals 1
+{
+3   0:  aload_0;
+    1:  invokespecial   #1; //  Method java/lang/Object."<init>":"()V";
+    4:  return;
+}
+
+public static final InnerClass #44= #43 of #45; //Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles
+
+BootstrapMethod #29 #30 #31 #30;
+
+} // end Class ConstantPoolTestDummy