class java.lang.ApplicationShutdownHooks
  minor version: 0
  major version: 59
  flags: flags: (0x0020) ACC_SUPER
  this_class: java.lang.ApplicationShutdownHooks
  super_class: java.lang.Object
{
  private static java.util.IdentityHashMap<java.lang.Thread, java.lang.Thread> hooks;
    descriptor: Ljava/util/IdentityHashMap;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Signature: Ljava/util/IdentityHashMap<Ljava/lang/Thread;Ljava/lang/Thread;>;

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=4, locals=0, args_size=0
         0: .line 42
            iconst_1
         1: .line 43
            iconst_0
         2: .line 44
            new java.lang.ApplicationShutdownHooks$1
            dup
            invokespecial java.lang.ApplicationShutdownHooks$1.<init>:()V
         3: .line 42
            invokestatic java.lang.Shutdown.add:(IZLjava/lang/Runnable;)V
         4: .line 50
            new java.util.IdentityHashMap
            dup
            invokespecial java.util.IdentityHashMap.<init>:()V
            putstatic java.lang.ApplicationShutdownHooks.hooks:Ljava/util/IdentityHashMap;
         5: .line 51
            goto 8
      StackMap locals:
      StackMap stack: java.lang.IllegalStateException
         6: pop
         7: .line 54
            aconst_null
            putstatic java.lang.ApplicationShutdownHooks.hooks:Ljava/util/IdentityHashMap;
         8: .line 56
      StackMap locals:
      StackMap stack:
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature
      Exception table:
        from    to  target  type
           0     5       6  Class java.lang.IllegalStateException

  private void <init>();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // java.lang.ApplicationShutdownHooks this
         0: .line 59
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // java.lang.ApplicationShutdownHooks this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Ljava/lang/ApplicationShutdownHooks;

  static synchronized void add(java.lang.Thread);
    descriptor: (Ljava/lang/Thread;)V
    flags: (0x0028) ACC_STATIC, ACC_SYNCHRONIZED
    Code:
      stack=3, locals=1, args_size=1
        start local 0 // java.lang.Thread hook
         0: .line 65
            getstatic java.lang.ApplicationShutdownHooks.hooks:Ljava/util/IdentityHashMap;
            ifnonnull 2
         1: .line 66
            new java.lang.IllegalStateException
            dup
            ldc "Shutdown in progress"
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 68
      StackMap locals:
      StackMap stack:
            aload 0 /* hook */
            invokevirtual java.lang.Thread.isAlive:()Z
            ifeq 4
         3: .line 69
            new java.lang.IllegalArgumentException
            dup
            ldc "Hook already running"
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         4: .line 71
      StackMap locals:
      StackMap stack:
            getstatic java.lang.ApplicationShutdownHooks.hooks:Ljava/util/IdentityHashMap;
            aload 0 /* hook */
            invokevirtual java.util.IdentityHashMap.containsKey:(Ljava/lang/Object;)Z
            ifeq 6
         5: .line 72
            new java.lang.IllegalArgumentException
            dup
            ldc "Hook previously registered"
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         6: .line 74
      StackMap locals:
      StackMap stack:
            getstatic java.lang.ApplicationShutdownHooks.hooks:Ljava/util/IdentityHashMap;
            aload 0 /* hook */
            aload 0 /* hook */
            invokevirtual java.util.IdentityHashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         7: .line 75
            return
        end local 0 // java.lang.Thread hook
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    8     0  hook  Ljava/lang/Thread;
    MethodParameters:
      Name  Flags
      hook  

  static synchronized boolean remove(java.lang.Thread);
    descriptor: (Ljava/lang/Thread;)Z
    flags: (0x0028) ACC_STATIC, ACC_SYNCHRONIZED
    Code:
      stack=3, locals=1, args_size=1
        start local 0 // java.lang.Thread hook
         0: .line 81
            getstatic java.lang.ApplicationShutdownHooks.hooks:Ljava/util/IdentityHashMap;
            ifnonnull 2
         1: .line 82
            new java.lang.IllegalStateException
            dup
            ldc "Shutdown in progress"
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 84
      StackMap locals:
      StackMap stack:
            aload 0 /* hook */
            ifnonnull 4
         3: .line 85
            new java.lang.NullPointerException
            dup
            invokespecial java.lang.NullPointerException.<init>:()V
            athrow
         4: .line 87
      StackMap locals:
      StackMap stack:
            getstatic java.lang.ApplicationShutdownHooks.hooks:Ljava/util/IdentityHashMap;
            aload 0 /* hook */
            invokevirtual java.util.IdentityHashMap.remove:(Ljava/lang/Object;)Ljava/lang/Object;
            ifnull 5
            iconst_1
            ireturn
      StackMap locals:
      StackMap stack:
         5: iconst_0
            ireturn
        end local 0 // java.lang.Thread hook
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    6     0  hook  Ljava/lang/Thread;
    MethodParameters:
      Name  Flags
      hook  

  static void runHooks();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=2, locals=3, args_size=0
         0: .line 96
            ldc Ljava/lang/ApplicationShutdownHooks;
            dup
            astore 1
            monitorenter
         1: .line 97
            getstatic java.lang.ApplicationShutdownHooks.hooks:Ljava/util/IdentityHashMap;
            invokevirtual java.util.IdentityHashMap.keySet:()Ljava/util/Set;
            astore 0 /* threads */
        start local 0 // java.util.Collection threads
         2: .line 98
            aconst_null
            putstatic java.lang.ApplicationShutdownHooks.hooks:Ljava/util/IdentityHashMap;
         3: .line 96
            aload 1
            monitorexit
         4: goto 7
        end local 0 // java.util.Collection threads
      StackMap locals: top java.lang.Class
      StackMap stack: java.lang.Throwable
         5: aload 1
            monitorexit
         6: athrow
        start local 0 // java.util.Collection threads
         7: .line 101
      StackMap locals: java.util.Collection
      StackMap stack:
            aload 0 /* threads */
            invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
            astore 2
            goto 10
      StackMap locals: java.util.Collection top java.util.Iterator
      StackMap stack:
         8: aload 2
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast java.lang.Thread
            astore 1 /* hook */
        start local 1 // java.lang.Thread hook
         9: .line 102
            aload 1 /* hook */
            invokevirtual java.lang.Thread.start:()V
        end local 1 // java.lang.Thread hook
        10: .line 101
      StackMap locals:
      StackMap stack:
            aload 2
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 8
        11: .line 104
            aload 0 /* threads */
            invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
            astore 2
            goto 17
      StackMap locals:
      StackMap stack:
        12: aload 2
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast java.lang.Thread
            astore 1 /* hook */
        start local 1 // java.lang.Thread hook
        13: .line 107
      StackMap locals: java.util.Collection java.lang.Thread java.util.Iterator
      StackMap stack:
            aload 1 /* hook */
            invokevirtual java.lang.Thread.join:()V
        14: .line 108
            goto 17
        15: .line 109
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
            pop
        16: .line 105
            goto 13
        end local 1 // java.lang.Thread hook
        17: .line 104
      StackMap locals: java.util.Collection top java.util.Iterator
      StackMap stack:
            aload 2
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 12
        18: .line 113
            return
        end local 0 // java.util.Collection threads
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            2    5     0  threads  Ljava/util/Collection<Ljava/lang/Thread;>;
            7   19     0  threads  Ljava/util/Collection<Ljava/lang/Thread;>;
            9   10     1     hook  Ljava/lang/Thread;
           13   17     1     hook  Ljava/lang/Thread;
      Exception table:
        from    to  target  type
           1     4       5  any
           5     6       5  any
          13    14      15  Class java.lang.InterruptedException
}
SourceFile: "ApplicationShutdownHooks.java"
NestMembers:
  java.lang.ApplicationShutdownHooks$1
InnerClasses:
  java.lang.ApplicationShutdownHooks$1