- $ javap -verbose OuterCls\$InnerCls
- Warning: File ./OuterCls$InnerCls.class does not contain class OuterCls$InnerCls
- Classfile /Users/ntchan/code/demo/concepts/src/com/ntchan/nestedcls/OuterCls$InnerCls.class
- Last modified Aug 14, 2018; size 648 bytes
- MD5 checksum 344420034b48389a027a2f303cd2617c
- Compiled from "OuterCls.java"
- class com.ntchan.nestedcls.OuterCls$InnerCls
- minor version: 0
- major version: 53
- flags: (0x0020) ACC_SUPER
- this_class: #6 // com/ntchan/nestedcls/OuterCls$InnerCls
- super_class: #7 // java/lang/Object
interfaces: 0, fields: 1, methods: 2, attributes: 2
- Constant pool:
- #1 = Fieldref #6.#18 // com/ntchan/nestedcls/OuterCls$InnerCls.this$0:Lcom/ntchan/nestedcls/OuterCls;
- #2 = Methodref #7.#19 // java/lang/Object."<init>":()V
- #3 = Fieldref #20.#21 // java/lang/System.out:Ljava/io/PrintStream;
- #4 = Methodref #22.#23 // com/ntchan/nestedcls/OuterCls.access$000:(Lcom/ntchan/nestedcls/OuterCls;)I
- #5 = Methodref #24.#25 // java/io/PrintStream.println:(I)V
- #6 = Class #26 // com/ntchan/nestedcls/OuterCls$InnerCls
- #7 = Class #29 // java/lang/Object
- #8 = Utf8 this$0
- #9 = Utf8 Lcom/ntchan/nestedcls/OuterCls;
- #10 = Utf8 <init>
- #11 = Utf8 (Lcom/ntchan/nestedcls/OuterCls;)V
- #12 = Utf8 Code
- #13 = Utf8 LineNumberTable
- #14 = Utf8 printOuterField
- #15 = Utf8 ()V
- #16 = Utf8 SourceFile
- #17 = Utf8 OuterCls.java
- #18 = NameAndType #8:#9 // this$0:Lcom/ntchan/nestedcls/OuterCls;
- #19 = NameAndType #10:#15 // "<init>":()V
- #20 = Class #30 // java/lang/System
- #21 = NameAndType #31:#32 // out:Ljava/io/PrintStream;
- #22 = Class #33 // com/ntchan/nestedcls/OuterCls
- #23 = NameAndType #34:#35 // access$000:(Lcom/ntchan/nestedcls/OuterCls;)I
- #24 = Class #36 // java/io/PrintStream
- #25 = NameAndType #37:#38 // println:(I)V
- #26 = Utf8 com/ntchan/nestedcls/OuterCls$InnerCls
- #27 = Utf8 InnerCls
- #28 = Utf8 InnerClasses
- #29 = Utf8 java/lang/Object
- #30 = Utf8 java/lang/System
- #31 = Utf8 out
- #32 = Utf8 Ljava/io/PrintStream;
- #33 = Utf8 com/ntchan/nestedcls/OuterCls
- #34 = Utf8 access$000
- #35 = Utf8 (Lcom/ntchan/nestedcls/OuterCls;)I
- #36 = Utf8 java/io/PrintStream
- #37 = Utf8 println
- #38 = Utf8 (I)V
- {
- final com.ntchan.nestedcls.OuterCls this$0;
- descriptor: Lcom/ntchan/nestedcls/OuterCls;
- flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC
- com.ntchan.nestedcls.OuterCls$InnerCls(com.ntchan.nestedcls.OuterCls);
- descriptor: (Lcom/ntchan/nestedcls/OuterCls;)V
- flags: (0x0000)
- Code:
- stack=2, locals=2, args_size=2
- 0: aload_0
- 1: aload_1
- 2: putfield #1 // Field this$0:Lcom/ntchan/nestedcls/OuterCls;
- 5: aload_0
- 6: invokespecial #2 // Method java/lang/Object."<init>":()V
- 9: return
- LineNumberTable:
- line 5: 0
- public void printOuterField();
- descriptor: ()V
- flags: (0x0001) ACC_PUBLIC
- Code:
- stack=2, locals=1, args_size=1
- 0: getstatic #3 // Field java/lang/System.out:Ljava/io/PrintStream;
- 3: aload_0
- 4: getfield #1 // Field this$0:Lcom/ntchan/nestedcls/OuterCls;
- 7: invokestatic #4 // Method com/ntchan/nestedcls/OuterCls.access$000:(Lcom/ntchan/nestedcls/OuterCls;)I
- 10: invokevirtual #5 // Method java/io/PrintStream.println:(I)V
- 13: return
- LineNumberTable:
- line 7: 0
- line 8: 13
- }
- SourceFile: "OuterCls.java"
- InnerClasses:
- #27= #6 of #22; // InnerCls=class com/ntchan/nestedcls/OuterCls$InnerCls of class com/ntchan/nestedcls/OuterCls
来源: https://www.cnblogs.com/JunFengChan/p/9465036.html