1 /* 2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 package sun/reflect/constantPool; 25 26 super public #2; //class ConstantPoolTestDummy 27 version 52:0 28 { 29 30 // Actually, only first 13 constant pool entries are actually used by the class 31 // and its methods. All the rest are added just for the testing of getTagAt method 32 // and getNameAndTypeRefIndexAt method. 33 34 const #1 = Method #3.#10; // java/lang/Object."<init>":"()V" 35 const #2 = class #11; // ConstantPoolTestDummy 36 const #3 = class #12; // java/lang/Object 37 const #4 = Asciz "<init>"; 38 const #5 = Asciz "()V"; 39 const #6 = Asciz "Code"; 40 const #7 = Asciz "LineNumberTable"; 41 const #8 = Asciz "SourceFile"; 42 const #9 = Asciz "ConstantPoolTestDummy.java"; 43 const #10 = NameAndType #4:#5; // "<init>":"()V" 44 const #11 = Asciz "sun/reflect/constantPool/ConstantPoolTestDummy"; 45 const #12 = Asciz "java/lang/Object"; 46 const #13 = long 6l; 47 const #15 = int 1; 48 const #16 = InterfaceMethod #17.#18; // java/lang/Runnable.run:"()V" 49 const #17 = class #19; // java/lang/Runnable 50 const #18 = NameAndType #20:#5; // run:"()V" 51 const #19 = Asciz "java/lang/Runnable"; 52 const #20 = Asciz "run"; 53 const #21 = double 1.45d; 54 const #23 = String #24; // "Hello" 55 const #24 = Asciz "Hello"; 56 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" 57 const #26 = NameAndType #27:#28; // accept:"()Ljava/util/function/Consumer;" 58 const #27 = Asciz "accept"; 59 const #28 = Asciz "()Ljava/util/function/Consumer;"; 60 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;" 61 const #30 = MethodType #33; // "(Ljava/lang/Object;)V" 62 const #31 = MethodHandle 5:#34; // REF_invokeVirtual:java/lang/Object.toString:"()Ljava/lang/String;" 63 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;" 64 const #33 = Asciz "(Ljava/lang/Object;)V"; 65 const #34 = Method #3.#37; // java/lang/Object.toString:"()Ljava/lang/String;" 66 const #35 = class #38; // java/lang/invoke/LambdaMetafactory 67 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;" 68 const #37 = NameAndType #41:#42; // toString:"()Ljava/lang/String;" 69 const #38 = Asciz "java/lang/invoke/LambdaMetafactory"; 70 const #39 = Asciz "metafactory"; 71 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;"; 72 const #41 = Asciz "toString"; 73 const #42 = Asciz "()Ljava/lang/String;"; 74 const #43 = class #46; // java/lang/invoke/MethodHandles$Lookup 75 const #44 = Asciz "Lookup"; 76 const #45 = class #47; // java/lang/invoke/MethodHandles 77 const #46 = Asciz "java/lang/invoke/MethodHandles$Lookup"; 78 const #47 = Asciz "java/lang/invoke/MethodHandles"; 79 const #48 = Field #2.#49; // sun/reflect/constantPool/ConstantPoolTestDummy.myField:"I" 80 const #49 = NameAndType #50:#51; // myField:"I" 81 const #50 = Asciz "myField"; 82 const #51 = Asciz "I"; 83 const #52 = float 1.34f; 84 85 public Method #4:#5 // "<init>":"()V" 86 87 stack 1 locals 1 88 { 89 3 0: aload_0; 90 1: invokespecial #1; // Method java/lang/Object."<init>":"()V"; 91 4: return; 92 } 93 94 public static final InnerClass #44= #43 of #45; //Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles 95 96 BootstrapMethod #29 #30 #31 #30; 97 98 } // end Class ConstantPoolTestDummy