Last active
August 29, 2015 14:21
-
-
Save liuxinglanyue/fd0070d679acd4737104 to your computer and use it in GitHub Desktop.
InvokeDynamic指令 参考:http://blog.csdn.net/zxhoo/article/details/38387141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InvokeDynamicTest { | |
public static void main(String[] args) { | |
Runnable x = () -> { | |
}; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Classfile /Users/jiaojianfeng/Documents/empleyment/gist/InvokeDynamicTest.class | |
Last modified 2015-5-19; size 985 bytes | |
MD5 checksum 2af891ea4b382afac3277750b4de94e7 | |
Compiled from "InvokeDynamicTest.java" | |
public class InvokeDynamicTest | |
minor version: 0 | |
major version: 52 | |
flags: ACC_PUBLIC, ACC_SUPER | |
Constant pool: | |
#1 = Methodref #4.#21 // java/lang/Object."<init>":()V | |
#2 = InvokeDynamic #0:#26 // #0:run:()Ljava/lang/Runnable; | |
#3 = Class #27 // InvokeDynamicTest | |
#4 = Class #28 // java/lang/Object | |
#5 = Utf8 <init> | |
#6 = Utf8 ()V | |
#7 = Utf8 Code | |
#8 = Utf8 LineNumberTable | |
#9 = Utf8 LocalVariableTable | |
#10 = Utf8 this | |
#11 = Utf8 LInvokeDynamicTest; | |
#12 = Utf8 main | |
#13 = Utf8 ([Ljava/lang/String;)V | |
#14 = Utf8 args | |
#15 = Utf8 [Ljava/lang/String; | |
#16 = Utf8 x | |
#17 = Utf8 Ljava/lang/Runnable; | |
#18 = Utf8 lambda$main$0 | |
#19 = Utf8 SourceFile | |
#20 = Utf8 InvokeDynamicTest.java | |
#21 = NameAndType #5:#6 // "<init>":()V | |
#22 = Utf8 BootstrapMethods | |
#23 = MethodHandle #6:#29 // 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; | |
#24 = MethodType #6 // ()V | |
#25 = MethodHandle #6:#30 // invokestatic InvokeDynamicTest.lambda$main$0:()V | |
#26 = NameAndType #31:#32 // run:()Ljava/lang/Runnable; | |
#27 = Utf8 InvokeDynamicTest | |
#28 = Utf8 java/lang/Object | |
#29 = Methodref #33.#34 // 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; | |
#30 = Methodref #3.#35 // InvokeDynamicTest.lambda$main$0:()V | |
#31 = Utf8 run | |
#32 = Utf8 ()Ljava/lang/Runnable; | |
#33 = Class #36 // java/lang/invoke/LambdaMetafactory | |
#34 = NameAndType #37:#41 // 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; | |
#35 = NameAndType #18:#6 // lambda$main$0:()V | |
#36 = Utf8 java/lang/invoke/LambdaMetafactory | |
#37 = Utf8 metafactory | |
#38 = Class #43 // java/lang/invoke/MethodHandles$Lookup | |
#39 = Utf8 Lookup | |
#40 = Utf8 InnerClasses | |
#41 = Utf8 (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; | |
#42 = Class #44 // java/lang/invoke/MethodHandles | |
#43 = Utf8 java/lang/invoke/MethodHandles$Lookup | |
#44 = Utf8 java/lang/invoke/MethodHandles | |
{ | |
public InvokeDynamicTest(); | |
descriptor: ()V | |
flags: ACC_PUBLIC | |
Code: | |
stack=1, locals=1, args_size=1 | |
0: aload_0 | |
1: invokespecial #1 // Method java/lang/Object."<init>":()V | |
4: return | |
LineNumberTable: | |
line 1: 0 | |
LocalVariableTable: | |
Start Length Slot Name Signature | |
0 5 0 this LInvokeDynamicTest; | |
public static void main(java.lang.String[]); | |
descriptor: ([Ljava/lang/String;)V | |
flags: ACC_PUBLIC, ACC_STATIC | |
Code: | |
stack=1, locals=2, args_size=1 | |
0: invokedynamic #2, 0 // InvokeDynamic #0:run:()Ljava/lang/Runnable; | |
5: astore_1 | |
6: return | |
LineNumberTable: | |
line 3: 0 | |
line 5: 6 | |
LocalVariableTable: | |
Start Length Slot Name Signature | |
0 7 0 args [Ljava/lang/String; | |
6 1 1 x Ljava/lang/Runnable; | |
} | |
SourceFile: "InvokeDynamicTest.java" | |
InnerClasses: | |
public static final #39= #38 of #42; //Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles | |
BootstrapMethods: | |
0: #23 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; | |
Method arguments: | |
#24 ()V | |
#25 invokestatic InvokeDynamicTest.lambda$main$0:()V | |
#24 ()V |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment