public class jdk.internal.jline.internal.ShutdownHooks
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: jdk.internal.jline.internal.ShutdownHooks
  super_class: java.lang.Object
{
  public static final java.lang.String JLINE_SHUTDOWNHOOK;
    descriptor: Ljava/lang/String;
    flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
    ConstantValue: "jline.shutdownhook"

  private static final boolean enabled;
    descriptor: Z
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  private static final java.util.List<jdk.internal.jline.internal.ShutdownHooks$Task> tasks;
    descriptor: Ljava/util/List;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    Signature: Ljava/util/List<Ljdk/internal/jline/internal/ShutdownHooks$Task;>;

  private static java.lang.Thread hook;
    descriptor: Ljava/lang/Thread;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=2, locals=0, args_size=0
         0: .line 26
            ldc "jline.shutdownhook"
            iconst_1
            invokestatic jdk.internal.jline.internal.Configuration.getBoolean:(Ljava/lang/String;Z)Z
            putstatic jdk.internal.jline.internal.ShutdownHooks.enabled:Z
         1: .line 28
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            putstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
         2: .line 30
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  public void <init>();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.internal.jline.internal.ShutdownHooks this
         0: .line 22
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // jdk.internal.jline.internal.ShutdownHooks this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Ljdk/internal/jline/internal/ShutdownHooks;

  public static synchronized <T extends jdk.internal.jline.internal.ShutdownHooks$Task> T add();
    descriptor: (Ljdk/internal/jline/internal/ShutdownHooks$Task;)Ljdk/internal/jline/internal/ShutdownHooks$Task;
    flags: (0x0029) ACC_PUBLIC, ACC_STATIC, ACC_SYNCHRONIZED
    Code:
      stack=4, locals=1, args_size=1
        start local 0 // jdk.internal.jline.internal.ShutdownHooks$Task task
         0: .line 33
            aload 0 /* task */
            invokestatic jdk.internal.jline.internal.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 36
            getstatic jdk.internal.jline.internal.ShutdownHooks.enabled:Z
            ifne 4
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         2: .line 37
            ldc "Shutdown-hook is disabled; not installing: "
            aastore
            dup
            iconst_1
            aload 0 /* task */
            aastore
            invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
         3: .line 38
            aload 0 /* task */
            areturn
         4: .line 42
      StackMap locals:
      StackMap stack:
            getstatic jdk.internal.jline.internal.ShutdownHooks.hook:Ljava/lang/Thread;
            ifnonnull 6
         5: .line 43
            new jdk.internal.jline.internal.ShutdownHooks$1
            dup
            ldc "JLine Shutdown Hook"
            invokespecial jdk.internal.jline.internal.ShutdownHooks$1.<init>:(Ljava/lang/String;)V
            invokestatic jdk.internal.jline.internal.ShutdownHooks.addHook:(Ljava/lang/Thread;)Ljava/lang/Thread;
            putstatic jdk.internal.jline.internal.ShutdownHooks.hook:Ljava/lang/Thread;
      StackMap locals:
      StackMap stack:
         6: iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         7: .line 53
            ldc "Adding shutdown-hook task: "
            aastore
            dup
            iconst_1
            aload 0 /* task */
            aastore
            invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
         8: .line 54
            getstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
            aload 0 /* task */
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
         9: .line 56
            aload 0 /* task */
            areturn
        end local 0 // jdk.internal.jline.internal.ShutdownHooks$Task task
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   10     0  task  TT;
    Signature: <T::Ljdk/internal/jline/internal/ShutdownHooks$Task;>(TT;)TT;
    MethodParameters:
      Name  Flags
      task  final

  private static synchronized void runTasks();
    descriptor: ()V
    flags: (0x002a) ACC_PRIVATE, ACC_STATIC, ACC_SYNCHRONIZED
    Code:
      stack=4, locals=5, args_size=0
         0: .line 74
            iconst_1
            anewarray java.lang.Object
            dup
            iconst_0
         1: .line 60
            ldc "Running all shutdown-hook tasks"
            aastore
            invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
         2: .line 63
            getstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
            getstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
            invokeinterface java.util.List.size:()I
            anewarray jdk.internal.jline.internal.ShutdownHooks$Task
            invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
            checkcast jdk.internal.jline.internal.ShutdownHooks$Task[]
            dup
            astore 3
            arraylength
            istore 2
            iconst_0
            istore 1
            goto 12
      StackMap locals: top int int jdk.internal.jline.internal.ShutdownHooks$Task[]
      StackMap stack:
         3: aload 3
            iload 1
            aaload
            astore 0 /* task */
        start local 0 // jdk.internal.jline.internal.ShutdownHooks$Task task
         4: iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         5: .line 64
            ldc "Running task: "
            aastore
            dup
            iconst_1
            aload 0 /* task */
            aastore
            invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
         6: .line 66
            aload 0 /* task */
            invokeinterface jdk.internal.jline.internal.ShutdownHooks$Task.run:()V
         7: .line 67
            goto 11
         8: .line 68
      StackMap locals: jdk.internal.jline.internal.ShutdownHooks$Task int int jdk.internal.jline.internal.ShutdownHooks$Task[]
      StackMap stack: java.lang.Throwable
            astore 4 /* e */
        start local 4 // java.lang.Throwable e
         9: iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
        10: .line 69
            ldc "Task failed"
            aastore
            dup
            iconst_1
            aload 4 /* e */
            aastore
            invokestatic jdk.internal.jline.internal.Log.warn:([Ljava/lang/Object;)V
        end local 4 // java.lang.Throwable e
        end local 0 // jdk.internal.jline.internal.ShutdownHooks$Task task
        11: .line 63
      StackMap locals: top int int jdk.internal.jline.internal.ShutdownHooks$Task[]
      StackMap stack:
            iinc 1 1
      StackMap locals:
      StackMap stack:
        12: iload 1
            iload 2
            if_icmplt 3
        13: .line 73
            getstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
            invokeinterface java.util.List.clear:()V
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            4   11     0  task  Ljdk/internal/jline/internal/ShutdownHooks$Task;
            9   11     4     e  Ljava/lang/Throwable;
      Exception table:
        from    to  target  type
           6     7       8  Class java.lang.Throwable

  private static java.lang.Thread addHook(java.lang.Thread);
    descriptor: (Ljava/lang/Thread;)Ljava/lang/Thread;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=4, locals=2, args_size=1
        start local 0 // java.lang.Thread thread
         0: .line 86
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         1: .line 77
            ldc "Registering shutdown-hook: "
            aastore
            dup
            iconst_1
            aload 0 /* thread */
            aastore
            invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
         2: .line 79
            invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
            aload 0 /* thread */
            invokevirtual java.lang.Runtime.addShutdownHook:(Ljava/lang/Thread;)V
         3: .line 80
            goto 7
         4: .line 81
      StackMap locals:
      StackMap stack: java.lang.AbstractMethodError
            astore 1 /* e */
        start local 1 // java.lang.AbstractMethodError e
         5: iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         6: .line 83
            ldc "Failed to register shutdown-hook"
            aastore
            dup
            iconst_1
            aload 1 /* e */
            aastore
            invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
        end local 1 // java.lang.AbstractMethodError e
         7: .line 85
      StackMap locals:
      StackMap stack:
            aload 0 /* thread */
            areturn
        end local 0 // java.lang.Thread thread
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    8     0  thread  Ljava/lang/Thread;
            5    7     1       e  Ljava/lang/AbstractMethodError;
      Exception table:
        from    to  target  type
           2     3       4  Class java.lang.AbstractMethodError
    MethodParameters:
        Name  Flags
      thread  final

  public static synchronized void remove(jdk.internal.jline.internal.ShutdownHooks$Task);
    descriptor: (Ljdk/internal/jline/internal/ShutdownHooks$Task;)V
    flags: (0x0029) ACC_PUBLIC, ACC_STATIC, ACC_SYNCHRONIZED
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.internal.jline.internal.ShutdownHooks$Task task
         0: .line 89
            aload 0 /* task */
            invokestatic jdk.internal.jline.internal.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 92
            getstatic jdk.internal.jline.internal.ShutdownHooks.enabled:Z
            ifeq 2
            getstatic jdk.internal.jline.internal.ShutdownHooks.hook:Ljava/lang/Thread;
            ifnonnull 3
         2: .line 93
      StackMap locals:
      StackMap stack:
            return
         3: .line 97
      StackMap locals:
      StackMap stack:
            getstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
            aload 0 /* task */
            invokeinterface java.util.List.remove:(Ljava/lang/Object;)Z
            pop
         4: .line 100
            getstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
            invokeinterface java.util.List.isEmpty:()Z
            ifeq 7
         5: .line 101
            getstatic jdk.internal.jline.internal.ShutdownHooks.hook:Ljava/lang/Thread;
            invokestatic jdk.internal.jline.internal.ShutdownHooks.removeHook:(Ljava/lang/Thread;)V
         6: .line 102
            aconst_null
            putstatic jdk.internal.jline.internal.ShutdownHooks.hook:Ljava/lang/Thread;
         7: .line 104
      StackMap locals:
      StackMap stack:
            return
        end local 0 // jdk.internal.jline.internal.ShutdownHooks$Task task
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    8     0  task  Ljdk/internal/jline/internal/ShutdownHooks$Task;
    MethodParameters:
      Name  Flags
      task  final

  private static void removeHook(java.lang.Thread);
    descriptor: (Ljava/lang/Thread;)V
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=4, locals=2, args_size=1
        start local 0 // java.lang.Thread thread
         0: .line 119
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         1: .line 107
            ldc "Removing shutdown-hook: "
            aastore
            dup
            iconst_1
            aload 0 /* thread */
            aastore
            invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
         2: .line 110
            invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
            aload 0 /* thread */
            invokevirtual java.lang.Runtime.removeShutdownHook:(Ljava/lang/Thread;)Z
            pop
         3: .line 111
            goto 9
         4: .line 112
      StackMap locals:
      StackMap stack: java.lang.AbstractMethodError
            astore 1 /* e */
        start local 1 // java.lang.AbstractMethodError e
         5: iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
         6: .line 114
            ldc "Failed to remove shutdown-hook"
            aastore
            dup
            iconst_1
            aload 1 /* e */
            aastore
            invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
        end local 1 // java.lang.AbstractMethodError e
         7: goto 9
         8: .line 116
      StackMap locals:
      StackMap stack: java.lang.IllegalStateException
            pop
      StackMap locals:
      StackMap stack:
         9: return
        end local 0 // java.lang.Thread thread
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0   10     0  thread  Ljava/lang/Thread;
            5    7     1       e  Ljava/lang/AbstractMethodError;
      Exception table:
        from    to  target  type
           2     3       4  Class java.lang.AbstractMethodError
           2     3       8  Class java.lang.IllegalStateException
    MethodParameters:
        Name  Flags
      thread  final
}
SourceFile: "ShutdownHooks.java"
NestMembers:
  jdk.internal.jline.internal.ShutdownHooks$1  jdk.internal.jline.internal.ShutdownHooks$Task
InnerClasses:
  jdk.internal.jline.internal.ShutdownHooks$1
  public abstract Task = jdk.internal.jline.internal.ShutdownHooks$Task of jdk.internal.jline.internal.ShutdownHooks