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: 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: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
2: 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/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 0: aload 0
invokestatic jdk.internal.jline.internal.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: getstatic jdk.internal.jline.internal.ShutdownHooks.enabled:Z
ifne 4
iconst_2
anewarray java.lang.Object
dup
iconst_0
2: ldc "Shutdown-hook is disabled; not installing: "
aastore
dup
iconst_1
aload 0
aastore
invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
3: aload 0
areturn
4: StackMap locals:
StackMap stack:
getstatic jdk.internal.jline.internal.ShutdownHooks.hook:Ljava/lang/Thread;
ifnonnull 6
5: 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: ldc "Adding shutdown-hook task: "
aastore
dup
iconst_1
aload 0
aastore
invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
8: getstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
aload 0
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
9: aload 0
areturn
end local 0 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: iconst_1
anewarray java.lang.Object
dup
iconst_0
1: ldc "Running all shutdown-hook tasks"
aastore
invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
2: 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
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.jline.internal.Log.debug:([Ljava/lang/Object;)V
6: aload 0
invokeinterface jdk.internal.jline.internal.ShutdownHooks$Task.run:()V
7: goto 11
8: StackMap locals: jdk.internal.jline.internal.ShutdownHooks$Task int int jdk.internal.jline.internal.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.jline.internal.Log.warn:([Ljava/lang/Object;)V
end local 4 end local 0 11: 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: 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 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.jline.internal.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: goto 7
4: StackMap locals:
StackMap stack: java.lang.AbstractMethodError
astore 1
start local 1 5: iconst_2
anewarray java.lang.Object
dup
iconst_0
6: ldc "Failed to register shutdown-hook"
aastore
dup
iconst_1
aload 1
aastore
invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
end local 1 7: StackMap locals:
StackMap stack:
aload 0
areturn
end local 0 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 0: aload 0
invokestatic jdk.internal.jline.internal.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: getstatic jdk.internal.jline.internal.ShutdownHooks.enabled:Z
ifeq 2
getstatic jdk.internal.jline.internal.ShutdownHooks.hook:Ljava/lang/Thread;
ifnonnull 3
2: StackMap locals:
StackMap stack:
return
3: StackMap locals:
StackMap stack:
getstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
aload 0
invokeinterface java.util.List.remove:(Ljava/lang/Object;)Z
pop
4: getstatic jdk.internal.jline.internal.ShutdownHooks.tasks:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
ifeq 7
5: getstatic jdk.internal.jline.internal.ShutdownHooks.hook:Ljava/lang/Thread;
invokestatic jdk.internal.jline.internal.ShutdownHooks.removeHook:(Ljava/lang/Thread;)V
6: aconst_null
putstatic jdk.internal.jline.internal.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/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 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.jline.internal.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 9
4: StackMap locals:
StackMap stack: java.lang.AbstractMethodError
astore 1
start local 1 5: iconst_2
anewarray java.lang.Object
dup
iconst_0
6: ldc "Failed to remove shutdown-hook"
aastore
dup
iconst_1
aload 1
aastore
invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
end local 1 7: goto 9
8: StackMap locals:
StackMap stack: java.lang.IllegalStateException
pop
StackMap locals:
StackMap stack:
9: return
end local 0 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