javap -c -v TestSynchronized
Last modified2019-5-27; size 719bytes
MD5 checksum e5058a43e76fe1cff6748d4eb1565658
Compiled from"TestSynchronized.java"
public classconstxiong.interview.TestSynchronized
minor version:0major version:49flags: ACC_PUBLIC, ACC_SUPER
Constant pool:
#1 = Class #2 //constxiong/interview/TestSynchronized
#2 = Utf8 constxiong/interview/TestSynchronized
#3 = Class #4 //java/lang/Object
#4 = Utf8 java/lang/Object
#5 = Utf8 #6 =Utf8 ()V
#7 =Utf8 Code
#8 = Methodref #3.#9 //java/lang/Object."":()V
#9 = NameAndType #5:#6 //"":()V
#10 =Utf8 LineNumberTable
#11 =Utf8 LocalVariableTable
#12 = Utf8 this#13 = Utf8 Lconstxiong/interview/TestSynchronized;
#14 =Utf8 sync
#15 = Fieldref #16.#18 //java/lang/System.out:Ljava/io/PrintStream;
#16 = Class #17 //java/lang/System
#17 = Utf8 java/lang/System
#18 = NameAndType #19:#20 //out:Ljava/io/PrintStream;
#19 =Utf8 out
#20 = Utf8 Ljava/io/PrintStream;
#21 = String #14 //sync
#22 = Methodref #23.#25 //java/io/PrintStream.println:(Ljava/lang/String;)V
#23 = Class #24 //java/io/PrintStream
#24 = Utf8 java/io/PrintStream
#25 = NameAndType #26:#27 //println:(Ljava/lang/String;)V
#26 =Utf8 println
#27 = Utf8 (Ljava/lang/String;)V
#28 =Utf8 syncdo
#29 = String #28 //syncdo
#30 =Utf8 staticSyncdo
#31 = String #30 //staticSyncdo
#32 =Utf8 SourceFile
#33 =Utf8 TestSynchronized.java
{publicconstxiong.interview.TestSynchronized();
descriptor: ()V
flags: ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
0: aload_01: invokespecial #8 //Method java/lang/Object."":()V
4: returnLineNumberTable:
line3: 0LocalVariableTable:
Start Length Slot Name Signature0 5 0 this Lconstxiong/interview/TestSynchronized;public voidsync();
descriptor: ()V
flags: ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
0: aload_01: dup2: astore_13: monitorenter4: getstatic #15 //Field java/lang/System.out:Ljava/io/PrintStream;
7: ldc #21 //String sync
9: invokevirtual #22 //Method java/io/PrintStream.println:(Ljava/lang/String;)V
12: aload_113: monitorexit14: goto 20
17: aload_118: monitorexit19: athrow20: returnException table:
from to target type4 14 17any17 19 17any
LineNumberTable:
line6: 0line7: 4line6: 12line9: 20LocalVariableTable:
Start Length Slot Name Signature0 21 0 this Lconstxiong/interview/TestSynchronized;public synchronized voidsyncdo();
descriptor: ()V
flags: ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
0: getstatic #15 //Field java/lang/System.out:Ljava/io/PrintStream;
3: ldc #29 //String syncdo
5: invokevirtual #22 //Method java/io/PrintStream.println:(Ljava/lang/String;)V
8: returnLineNumberTable:
line12: 0line13: 8LocalVariableTable:
Start Length Slot Name Signature0 9 0 this Lconstxiong/interview/TestSynchronized;public static synchronized voidstaticSyncdo();
descriptor: ()V
flags: ACC_PUBLIC, ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=0, args_size=0
0: getstatic #15 //Field java/lang/System.out:Ljava/io/PrintStream;
3: ldc #31 //String staticSyncdo
5: invokevirtual #22 //Method java/io/PrintStream.println:(Ljava/lang/String;)V
8: returnLineNumberTable:
line16: 0line17: 8LocalVariableTable:
Start Length Slot Name Signature
}
SourceFile:"TestSynchronized.java"