Created
August 14, 2021 09:10
-
-
Save tvd12/2215a3632268f4b1c0af52d5f53e224b to your computer and use it in GitHub Desktop.
This file contains hidden or 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/tvd12/tmp/VolatileBooleanExample.class | |
| Last modified Aug 14, 2021; size 1783 bytes | |
| MD5 checksum df4780a626dc6a9221674f383a9459f2 | |
| Compiled from "VolatileBooleanExample.java" | |
| public class VolatileBooleanExample | |
| minor version: 0 | |
| major version: 52 | |
| flags: ACC_PUBLIC, ACC_SUPER | |
| Constant pool: | |
| #1 = Methodref #20.#41 // java/lang/Object."<init>":()V | |
| #2 = Class #42 // java/lang/Thread | |
| #3 = InvokeDynamic #0:#47 // #0:run:(LVolatileBooleanExample;)Ljava/lang/Runnable; | |
| #4 = Methodref #2.#48 // java/lang/Thread."<init>":(Ljava/lang/Runnable;)V | |
| #5 = Methodref #2.#49 // java/lang/Thread.start:()V | |
| #6 = InvokeDynamic #1:#47 // #1:run:(LVolatileBooleanExample;)Ljava/lang/Runnable; | |
| #7 = Methodref #2.#51 // java/lang/Thread.sleep:(J)V | |
| #8 = Class #52 // java/lang/InterruptedException | |
| #9 = Methodref #8.#53 // java/lang/InterruptedException.printStackTrace:()V | |
| #10 = Class #54 // VolatileBooleanExample | |
| #11 = Methodref #10.#41 // VolatileBooleanExample."<init>":()V | |
| #12 = Methodref #10.#55 // VolatileBooleanExample.prepare:()V | |
| #13 = Methodref #10.#49 // VolatileBooleanExample.start:()V | |
| #14 = Methodref #10.#56 // VolatileBooleanExample.sleep:(I)V | |
| #15 = Fieldref #10.#57 // VolatileBooleanExample.active:Z | |
| #16 = Fieldref #58.#59 // java/lang/System.out:Ljava/io/PrintStream; | |
| #17 = String #60 // application started | |
| #18 = Methodref #61.#62 // java/io/PrintStream.println:(Ljava/lang/String;)V | |
| #19 = String #63 // application preparing ... | |
| #20 = Class #64 // java/lang/Object | |
| #21 = Utf8 active | |
| #22 = Utf8 Z | |
| #23 = Utf8 <init> | |
| #24 = Utf8 ()V | |
| #25 = Utf8 Code | |
| #26 = Utf8 LineNumberTable | |
| #27 = Utf8 prepare | |
| #28 = Utf8 Exceptions | |
| #29 = Utf8 start | |
| #30 = Class #65 // java/lang/Exception | |
| #31 = Utf8 sleep | |
| #32 = Utf8 (I)V | |
| #33 = Utf8 StackMapTable | |
| #34 = Class #52 // java/lang/InterruptedException | |
| #35 = Utf8 main | |
| #36 = Utf8 ([Ljava/lang/String;)V | |
| #37 = Utf8 lambda$start$1 | |
| #38 = Utf8 lambda$prepare$0 | |
| #39 = Utf8 SourceFile | |
| #40 = Utf8 VolatileBooleanExample.java | |
| #41 = NameAndType #23:#24 // "<init>":()V | |
| #42 = Utf8 java/lang/Thread | |
| #43 = Utf8 BootstrapMethods | |
| #44 = MethodHandle #6:#66 // 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; | |
| #45 = MethodType #24 // ()V | |
| #46 = MethodHandle #7:#67 // invokespecial VolatileBooleanExample.lambda$prepare$0:()V | |
| #47 = NameAndType #68:#69 // run:(LVolatileBooleanExample;)Ljava/lang/Runnable; | |
| #48 = NameAndType #23:#70 // "<init>":(Ljava/lang/Runnable;)V | |
| #49 = NameAndType #29:#24 // start:()V | |
| #50 = MethodHandle #7:#71 // invokespecial VolatileBooleanExample.lambda$start$1:()V | |
| #51 = NameAndType #31:#72 // sleep:(J)V | |
| #52 = Utf8 java/lang/InterruptedException | |
| #53 = NameAndType #73:#24 // printStackTrace:()V | |
| #54 = Utf8 VolatileBooleanExample | |
| #55 = NameAndType #27:#24 // prepare:()V | |
| #56 = NameAndType #31:#32 // sleep:(I)V | |
| #57 = NameAndType #21:#22 // active:Z | |
| #58 = Class #74 // java/lang/System | |
| #59 = NameAndType #75:#76 // out:Ljava/io/PrintStream; | |
| #60 = Utf8 application started | |
| #61 = Class #77 // java/io/PrintStream | |
| #62 = NameAndType #78:#79 // println:(Ljava/lang/String;)V | |
| #63 = Utf8 application preparing ... | |
| #64 = Utf8 java/lang/Object | |
| #65 = Utf8 java/lang/Exception | |
| #66 = Methodref #80.#81 // 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; | |
| #67 = Methodref #10.#82 // VolatileBooleanExample.lambda$prepare$0:()V | |
| #68 = Utf8 run | |
| #69 = Utf8 (LVolatileBooleanExample;)Ljava/lang/Runnable; | |
| #70 = Utf8 (Ljava/lang/Runnable;)V | |
| #71 = Methodref #10.#83 // VolatileBooleanExample.lambda$start$1:()V | |
| #72 = Utf8 (J)V | |
| #73 = Utf8 printStackTrace | |
| #74 = Utf8 java/lang/System | |
| #75 = Utf8 out | |
| #76 = Utf8 Ljava/io/PrintStream; | |
| #77 = Utf8 java/io/PrintStream | |
| #78 = Utf8 println | |
| #79 = Utf8 (Ljava/lang/String;)V | |
| #80 = Class #84 // java/lang/invoke/LambdaMetafactory | |
| #81 = NameAndType #85:#89 // 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; | |
| #82 = NameAndType #38:#24 // lambda$prepare$0:()V | |
| #83 = NameAndType #37:#24 // lambda$start$1:()V | |
| #84 = Utf8 java/lang/invoke/LambdaMetafactory | |
| #85 = Utf8 metafactory | |
| #86 = Class #91 // java/lang/invoke/MethodHandles$Lookup | |
| #87 = Utf8 Lookup | |
| #88 = Utf8 InnerClasses | |
| #89 = 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; | |
| #90 = Class #92 // java/lang/invoke/MethodHandles | |
| #91 = Utf8 java/lang/invoke/MethodHandles$Lookup | |
| #92 = Utf8 java/lang/invoke/MethodHandles | |
| { | |
| private volatile boolean active; | |
| descriptor: Z | |
| flags: ACC_PRIVATE, ACC_VOLATILE | |
| public VolatileBooleanExample(); | |
| 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 | |
| public void prepare() throws java.lang.InterruptedException; | |
| descriptor: ()V | |
| flags: ACC_PUBLIC | |
| Code: | |
| stack=3, locals=1, args_size=1 | |
| 0: new #2 // class java/lang/Thread | |
| 3: dup | |
| 4: aload_0 | |
| 5: invokedynamic #3, 0 // InvokeDynamic #0:run:(LVolatileBooleanExample;)Ljava/lang/Runnable; | |
| 10: invokespecial #4 // Method java/lang/Thread."<init>":(Ljava/lang/Runnable;)V | |
| 13: invokevirtual #5 // Method java/lang/Thread.start:()V | |
| 16: return | |
| LineNumberTable: | |
| line 6: 0 | |
| line 11: 13 | |
| line 12: 16 | |
| Exceptions: | |
| throws java.lang.InterruptedException | |
| public void start() throws java.lang.Exception; | |
| descriptor: ()V | |
| flags: ACC_PUBLIC | |
| Code: | |
| stack=3, locals=1, args_size=1 | |
| 0: new #2 // class java/lang/Thread | |
| 3: dup | |
| 4: aload_0 | |
| 5: invokedynamic #6, 0 // InvokeDynamic #1:run:(LVolatileBooleanExample;)Ljava/lang/Runnable; | |
| 10: invokespecial #4 // Method java/lang/Thread."<init>":(Ljava/lang/Runnable;)V | |
| 13: invokevirtual #5 // Method java/lang/Thread.start:()V | |
| 16: return | |
| LineNumberTable: | |
| line 15: 0 | |
| line 19: 13 | |
| line 20: 16 | |
| Exceptions: | |
| throws java.lang.Exception | |
| private static void sleep(int); | |
| descriptor: (I)V | |
| flags: ACC_PRIVATE, ACC_STATIC | |
| Code: | |
| stack=2, locals=2, args_size=1 | |
| 0: iload_0 | |
| 1: sipush 1000 | |
| 4: imul | |
| 5: i2l | |
| 6: invokestatic #7 // Method java/lang/Thread.sleep:(J)V | |
| 9: goto 17 | |
| 12: astore_1 | |
| 13: aload_1 | |
| 14: invokevirtual #9 // Method java/lang/InterruptedException.printStackTrace:()V | |
| 17: return | |
| Exception table: | |
| from to target type | |
| 0 9 12 Class java/lang/InterruptedException | |
| LineNumberTable: | |
| line 24: 0 | |
| line 27: 9 | |
| line 25: 12 | |
| line 26: 13 | |
| line 28: 17 | |
| StackMapTable: number_of_entries = 2 | |
| frame_type = 76 /* same_locals_1_stack_item */ | |
| stack = [ class java/lang/InterruptedException ] | |
| frame_type = 4 /* same */ | |
| public static void main(java.lang.String[]) throws java.lang.Exception; | |
| descriptor: ([Ljava/lang/String;)V | |
| flags: ACC_PUBLIC, ACC_STATIC | |
| Code: | |
| stack=2, locals=2, args_size=1 | |
| 0: new #10 // class VolatileBooleanExample | |
| 3: dup | |
| 4: invokespecial #11 // Method "<init>":()V | |
| 7: astore_1 | |
| 8: aload_1 | |
| 9: invokevirtual #12 // Method prepare:()V | |
| 12: aload_1 | |
| 13: invokevirtual #13 // Method start:()V | |
| 16: bipush 10 | |
| 18: invokestatic #14 // Method sleep:(I)V | |
| 21: return | |
| LineNumberTable: | |
| line 31: 0 | |
| line 32: 8 | |
| line 33: 12 | |
| line 34: 16 | |
| line 35: 21 | |
| Exceptions: | |
| throws java.lang.Exception | |
| private void lambda$start$1(); | |
| descriptor: ()V | |
| flags: ACC_PRIVATE, ACC_SYNTHETIC | |
| Code: | |
| stack=2, locals=1, args_size=1 | |
| 0: aload_0 | |
| 1: getfield #15 // Field active:Z | |
| 4: ifne 10 | |
| 7: goto 0 | |
| 10: getstatic #16 // Field java/lang/System.out:Ljava/io/PrintStream; | |
| 13: ldc #17 // String application started | |
| 15: invokevirtual #18 // Method java/io/PrintStream.println:(Ljava/lang/String;)V | |
| 18: return | |
| LineNumberTable: | |
| line 16: 0 | |
| line 17: 10 | |
| line 18: 18 | |
| StackMapTable: number_of_entries = 2 | |
| frame_type = 0 /* same */ | |
| frame_type = 9 /* same */ | |
| private void lambda$prepare$0(); | |
| descriptor: ()V | |
| flags: ACC_PRIVATE, ACC_SYNTHETIC | |
| Code: | |
| stack=2, locals=1, args_size=1 | |
| 0: getstatic #16 // Field java/lang/System.out:Ljava/io/PrintStream; | |
| 3: ldc #19 // String application preparing ... | |
| 5: invokevirtual #18 // Method java/io/PrintStream.println:(Ljava/lang/String;)V | |
| 8: iconst_3 | |
| 9: invokestatic #14 // Method sleep:(I)V | |
| 12: aload_0 | |
| 13: iconst_1 | |
| 14: putfield #15 // Field active:Z | |
| 17: return | |
| LineNumberTable: | |
| line 7: 0 | |
| line 8: 8 | |
| line 9: 12 | |
| line 10: 17 | |
| } | |
| SourceFile: "VolatileBooleanExample.java" | |
| InnerClasses: | |
| public static final #87= #86 of #90; //Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles | |
| BootstrapMethods: | |
| 0: #44 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: | |
| #45 ()V | |
| #46 invokespecial VolatileBooleanExample.lambda$prepare$0:()V | |
| #45 ()V | |
| 1: #44 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: | |
| #45 ()V | |
| #50 invokespecial VolatileBooleanExample.lambda$start$1:()V | |
| #45 ()V |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment