public final class jdk.internal.org.jline.utils.ShutdownHooks
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.internal.org.jline.utils.ShutdownHooks
super_class: java.lang.Object
{
private static final java.util.List<jdk.internal.org.jline.utils.ShutdownHooks$Task> tasks;
descriptor: Ljava/util/List;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/List<Ljdk/internal/org/jline/utils/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: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putstatic jdk.internal.org.jline.utils.ShutdownHooks.tasks:Ljava/util/List;
1: 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 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/org/jline/utils/ShutdownHooks;
public static synchronized <T extends jdk.internal.org.jline.utils.ShutdownHooks$Task> T add();
descriptor: (Ljdk/internal/org/jline/utils/ShutdownHooks$Task;)Ljdk/internal/org/jline/utils/ShutdownHooks$Task;
flags: (0x0029) ACC_PUBLIC, ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: getstatic jdk.internal.org.jline.utils.ShutdownHooks.hook:Ljava/lang/Thread;
ifnonnull 3
2: new jdk.internal.org.jline.utils.ShutdownHooks$1
dup
ldc "JLine Shutdown Hook"
invokespecial jdk.internal.org.jline.utils.ShutdownHooks$1.<init>:(Ljava/lang/String;)V
invokestatic jdk.internal.org.jline.utils.ShutdownHooks.addHook:(Ljava/lang/Thread;)Ljava/lang/Thread;
putstatic jdk.internal.org.jline.utils.ShutdownHooks.hook:Ljava/lang/Thread;
StackMap locals:
StackMap stack:
3: iconst_2
anewarray java.lang.Object
dup
iconst_0
4: ldc "Adding shutdown-hook task: "
aastore
dup
iconst_1
aload 0
aastore
invokestatic jdk.internal.org.jline.utils.Log.debug:([Ljava/lang/Object;)V
5: getstatic jdk.internal.org.jline.utils.ShutdownHooks.tasks:Ljava/util/List;
aload 0
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
6: aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 task TT;
Signature: <T::Ljdk/internal/org/jline/utils/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: iconst_1
anewarray java.lang.Object
dup
iconst_0
1: ldc "Running all shutdown-hook tasks"
aastore
invokestatic jdk.internal.org.jline.utils.Log.debug:([Ljava/lang/Object;)V
2: getstatic jdk.internal.org.jline.utils.ShutdownHooks.tasks:Ljava/util/List;
getstatic jdk.internal.org.jline.utils.ShutdownHooks.tasks:Ljava/util/List;
invokeinterface java.util.List.size:()I
anewarray jdk.internal.org.jline.utils.ShutdownHooks$Task
invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast jdk.internal.org.jline.utils.ShutdownHooks$Task[]
dup
astore 3
arraylength
istore 2
iconst_0
istore 1
goto 12
StackMap locals: top int int jdk.internal.org.jline.utils.ShutdownHooks$Task[]
StackMap stack:
3: aload 3
iload 1
aaload
astore 0
start local 0 4: iconst_2
anewarray java.lang.Object
dup
iconst_0
5: ldc "Running task: "
aastore
dup
iconst_1
aload 0
aastore
invokestatic jdk.internal.org.jline.utils.Log.debug:([Ljava/lang/Object;)V
6: aload 0
invokeinterface jdk.internal.org.jline.utils.ShutdownHooks$Task.run:()V
7: goto 11
8: StackMap locals: jdk.internal.org.jline.utils.ShutdownHooks$Task int int jdk.internal.org.jline.utils.ShutdownHooks$Task[]
StackMap stack: java.lang.Throwable
astore 4
start local 4 9: iconst_2
anewarray java.lang.Object
dup
iconst_0
10: ldc "Task failed"
aastore
dup
iconst_1
aload 4
aastore
invokestatic jdk.internal.org.jline.utils.Log.warn:([Ljava/lang/Object;)V
end local 4 end local 0 11: StackMap locals: top int int jdk.internal.org.jline.utils.ShutdownHooks$Task[]
StackMap stack:
iinc 1 1
StackMap locals:
StackMap stack:
12: iload 1
iload 2
if_icmplt 3
13: getstatic jdk.internal.org.jline.utils.ShutdownHooks.tasks:Ljava/util/List;
invokeinterface java.util.List.clear:()V
return
LocalVariableTable:
Start End Slot Name Signature
4 11 0 task Ljdk/internal/org/jline/utils/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=1, args_size=1
start local 0 0: iconst_2
anewarray java.lang.Object
dup
iconst_0
1: ldc "Registering shutdown-hook: "
aastore
dup
iconst_1
aload 0
aastore
invokestatic jdk.internal.org.jline.utils.Log.debug:([Ljava/lang/Object;)V
2: invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
aload 0
invokevirtual java.lang.Runtime.addShutdownHook:(Ljava/lang/Thread;)V
3: aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 thread Ljava/lang/Thread;
MethodParameters:
Name Flags
thread final
public static synchronized void remove(jdk.internal.org.jline.utils.ShutdownHooks$Task);
descriptor: (Ljdk/internal/org/jline/utils/ShutdownHooks$Task;)V
flags: (0x0029) ACC_PUBLIC, ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: getstatic jdk.internal.org.jline.utils.ShutdownHooks.hook:Ljava/lang/Thread;
ifnonnull 3
2: return
3: StackMap locals:
StackMap stack:
getstatic jdk.internal.org.jline.utils.ShutdownHooks.tasks:Ljava/util/List;
aload 0
invokeinterface java.util.List.remove:(Ljava/lang/Object;)Z
pop
4: getstatic jdk.internal.org.jline.utils.ShutdownHooks.tasks:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
ifeq 7
5: getstatic jdk.internal.org.jline.utils.ShutdownHooks.hook:Ljava/lang/Thread;
invokestatic jdk.internal.org.jline.utils.ShutdownHooks.removeHook:(Ljava/lang/Thread;)V
6: aconst_null
putstatic jdk.internal.org.jline.utils.ShutdownHooks.hook:Ljava/lang/Thread;
7: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 task Ljdk/internal/org/jline/utils/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=1, args_size=1
start local 0 0: iconst_2
anewarray java.lang.Object
dup
iconst_0
1: ldc "Removing shutdown-hook: "
aastore
dup
iconst_1
aload 0
aastore
invokestatic jdk.internal.org.jline.utils.Log.debug:([Ljava/lang/Object;)V
2: invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
aload 0
invokevirtual java.lang.Runtime.removeShutdownHook:(Ljava/lang/Thread;)Z
pop
3: goto 5
4: StackMap locals:
StackMap stack: java.lang.IllegalStateException
pop
StackMap locals:
StackMap stack:
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 thread Ljava/lang/Thread;
Exception table:
from to target type
2 3 4 Class java.lang.IllegalStateException
MethodParameters:
Name Flags
thread final
}
SourceFile: "ShutdownHooks.java"
NestMembers:
jdk.internal.org.jline.utils.ShutdownHooks$1 jdk.internal.org.jline.utils.ShutdownHooks$Task
InnerClasses:
jdk.internal.org.jline.utils.ShutdownHooks$1
public abstract Task = jdk.internal.org.jline.utils.ShutdownHooks$Task of jdk.internal.org.jline.utils.ShutdownHooks