public class jdk.internal.editor.external.ExternalEditor
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.internal.editor.external.ExternalEditor
super_class: java.lang.Object
{
private final java.util.function.Consumer<java.lang.String> errorHandler;
descriptor: Ljava/util/function/Consumer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/function/Consumer<Ljava/lang/String;>;
private final java.util.function.Consumer<java.lang.String> saveHandler;
descriptor: Ljava/util/function/Consumer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/function/Consumer<Ljava/lang/String;>;
private final boolean wait;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Runnable suspendInteractiveInput;
descriptor: Ljava/lang/Runnable;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Runnable resumeInteractiveInput;
descriptor: Ljava/lang/Runnable;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Runnable promptForNewLineToEndWait;
descriptor: Ljava/lang/Runnable;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private java.nio.file.WatchService watcher;
descriptor: Ljava/nio/file/WatchService;
flags: (0x0002) ACC_PRIVATE
private java.lang.Thread watchedThread;
descriptor: Ljava/lang/Thread;
flags: (0x0002) ACC_PRIVATE
private java.nio.file.Path dir;
descriptor: Ljava/nio/file/Path;
flags: (0x0002) ACC_PRIVATE
private java.nio.file.Path tmpfile;
descriptor: Ljava/nio/file/Path;
flags: (0x0002) ACC_PRIVATE
public static void edit(java.lang.String[], java.lang.String, java.util.function.Consumer<java.lang.String>, java.util.function.Consumer<java.lang.String>, java.lang.Runnable, java.lang.Runnable, boolean, java.lang.Runnable);
descriptor: ([Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Consumer;Ljava/util/function/Consumer;Ljava/lang/Runnable;Ljava/lang/Runnable;ZLjava/lang/Runnable;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=9, args_size=8
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 start local 7 0: new jdk.internal.editor.external.ExternalEditor
dup
aload 2
aload 3
aload 4
1: aload 5
iload 6
aload 7
2: invokespecial jdk.internal.editor.external.ExternalEditor.<init>:(Ljava/util/function/Consumer;Ljava/util/function/Consumer;Ljava/lang/Runnable;Ljava/lang/Runnable;ZLjava/lang/Runnable;)V
astore 8
start local 8 3: aload 8
aload 0
aload 1
invokevirtual jdk.internal.editor.external.ExternalEditor.edit:([Ljava/lang/String;Ljava/lang/String;)V
4: return
end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 cmd [Ljava/lang/String;
0 5 1 initialText Ljava/lang/String;
0 5 2 errorHandler Ljava/util/function/Consumer<Ljava/lang/String;>;
0 5 3 saveHandler Ljava/util/function/Consumer<Ljava/lang/String;>;
0 5 4 suspendInteractiveInput Ljava/lang/Runnable;
0 5 5 resumeInteractiveInput Ljava/lang/Runnable;
0 5 6 wait Z
0 5 7 promptForNewLineToEndWait Ljava/lang/Runnable;
3 5 8 ed Ljdk/internal/editor/external/ExternalEditor;
Signature: ([Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Consumer<Ljava/lang/String;>;Ljava/util/function/Consumer<Ljava/lang/String;>;Ljava/lang/Runnable;Ljava/lang/Runnable;ZLjava/lang/Runnable;)V
MethodParameters:
Name Flags
cmd
initialText
errorHandler
saveHandler
suspendInteractiveInput
resumeInteractiveInput
wait
promptForNewLineToEndWait
void <init>(java.util.function.Consumer<java.lang.String>, java.util.function.Consumer<java.lang.String>, java.lang.Runnable, java.lang.Runnable, boolean, java.lang.Runnable);
descriptor: (Ljava/util/function/Consumer;Ljava/util/function/Consumer;Ljava/lang/Runnable;Ljava/lang/Runnable;ZLjava/lang/Runnable;)V
flags: (0x0000)
Code:
stack=2, locals=7, args_size=7
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield jdk.internal.editor.external.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
2: aload 0
aload 2
putfield jdk.internal.editor.external.ExternalEditor.saveHandler:Ljava/util/function/Consumer;
3: aload 0
iload 5
putfield jdk.internal.editor.external.ExternalEditor.wait:Z
4: aload 0
aload 3
putfield jdk.internal.editor.external.ExternalEditor.suspendInteractiveInput:Ljava/lang/Runnable;
5: aload 0
aload 4
putfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
6: aload 0
aload 6
putfield jdk.internal.editor.external.ExternalEditor.promptForNewLineToEndWait:Ljava/lang/Runnable;
7: return
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/internal/editor/external/ExternalEditor;
0 8 1 errorHandler Ljava/util/function/Consumer<Ljava/lang/String;>;
0 8 2 saveHandler Ljava/util/function/Consumer<Ljava/lang/String;>;
0 8 3 suspendInteractiveInput Ljava/lang/Runnable;
0 8 4 resumeInteractiveInput Ljava/lang/Runnable;
0 8 5 wait Z
0 8 6 promptForNewLineToEndWait Ljava/lang/Runnable;
Signature: (Ljava/util/function/Consumer<Ljava/lang/String;>;Ljava/util/function/Consumer<Ljava/lang/String;>;Ljava/lang/Runnable;Ljava/lang/Runnable;ZLjava/lang/Runnable;)V
MethodParameters:
Name Flags
errorHandler
saveHandler
suspendInteractiveInput
resumeInteractiveInput
wait
promptForNewLineToEndWait
private void edit(java.lang.String[], java.lang.String);
descriptor: ([Ljava/lang/String;Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
invokevirtual jdk.internal.editor.external.ExternalEditor.setupWatch:(Ljava/lang/String;)V
1: aload 0
aload 1
invokevirtual jdk.internal.editor.external.ExternalEditor.launch:([Ljava/lang/String;)V
2: goto 9
StackMap locals:
StackMap stack: java.io.IOException
3: astore 3
start local 3 4: aload 0
getfield jdk.internal.editor.external.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
aload 3
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 3 5: aload 0
invokevirtual jdk.internal.editor.external.ExternalEditor.deleteDirectory:()V
goto 10
6: StackMap locals:
StackMap stack: java.lang.Throwable
astore 4
7: aload 0
invokevirtual jdk.internal.editor.external.ExternalEditor.deleteDirectory:()V
8: aload 4
athrow
9: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.internal.editor.external.ExternalEditor.deleteDirectory:()V
10: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Ljdk/internal/editor/external/ExternalEditor;
0 11 1 cmd [Ljava/lang/String;
0 11 2 initialText Ljava/lang/String;
4 5 3 ex Ljava/io/IOException;
Exception table:
from to target type
0 2 3 Class java.io.IOException
0 5 6 any
MethodParameters:
Name Flags
cmd
initialText
private void setupWatch(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokestatic java.nio.file.FileSystems.getDefault:()Ljava/nio/file/FileSystem;
invokevirtual java.nio.file.FileSystem.newWatchService:()Ljava/nio/file/WatchService;
putfield jdk.internal.editor.external.ExternalEditor.watcher:Ljava/nio/file/WatchService;
1: aload 0
ldc "extedit"
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createTempDirectory:(Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
putfield jdk.internal.editor.external.ExternalEditor.dir:Ljava/nio/file/Path;
2: aload 0
aload 0
getfield jdk.internal.editor.external.ExternalEditor.dir:Ljava/nio/file/Path;
aconst_null
ldc ".java"
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createTempFile:(Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
putfield jdk.internal.editor.external.ExternalEditor.tmpfile:Ljava/nio/file/Path;
3: aload 0
getfield jdk.internal.editor.external.ExternalEditor.tmpfile:Ljava/nio/file/Path;
aload 1
ldc "UTF-8"
invokestatic java.nio.charset.Charset.forName:(Ljava/lang/String;)Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.file.Files.write:(Ljava/nio/file/Path;[B[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;
pop
4: aload 0
getfield jdk.internal.editor.external.ExternalEditor.dir:Ljava/nio/file/Path;
aload 0
getfield jdk.internal.editor.external.ExternalEditor.watcher:Ljava/nio/file/WatchService;
iconst_3
anewarray java.nio.file.WatchEvent$Kind
dup
iconst_0
5: getstatic java.nio.file.StandardWatchEventKinds.ENTRY_CREATE:Ljava/nio/file/WatchEvent$Kind;
aastore
dup
iconst_1
6: getstatic java.nio.file.StandardWatchEventKinds.ENTRY_DELETE:Ljava/nio/file/WatchEvent$Kind;
aastore
dup
iconst_2
7: getstatic java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY:Ljava/nio/file/WatchEvent$Kind;
aastore
8: invokeinterface java.nio.file.Path.register:(Ljava/nio/file/WatchService;[Ljava/nio/file/WatchEvent$Kind;)Ljava/nio/file/WatchKey;
pop
9: aload 0
new java.lang.Thread
dup
aload 0
invokedynamic run(Ljdk/internal/editor/external/ExternalEditor;)Ljava/lang/Runnable;
Bootstrap: 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:
()V
jdk/internal/editor/external/ExternalEditor.lambda$0()V (7)
()V
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
putfield jdk.internal.editor.external.ExternalEditor.watchedThread:Ljava/lang/Thread;
10: aload 0
getfield jdk.internal.editor.external.ExternalEditor.watchedThread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.start:()V
11: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/internal/editor/external/ExternalEditor;
0 12 1 initialText Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
initialText
private void launch(java.lang.String[]);
descriptor: ([Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=9, args_size=2
start local 0 start local 1 0: aload 1
aload 1
arraylength
iconst_1
iadd
invokestatic java.util.Arrays.copyOf:([Ljava/lang/Object;I)[Ljava/lang/Object;
checkcast java.lang.String[]
astore 2
start local 2 1: aload 2
aload 1
arraylength
aload 0
getfield jdk.internal.editor.external.ExternalEditor.tmpfile:Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
aastore
2: new java.lang.ProcessBuilder
dup
aload 2
invokespecial java.lang.ProcessBuilder.<init>:([Ljava/lang/String;)V
astore 3
start local 3 3: aload 3
invokevirtual java.lang.ProcessBuilder.inheritIO:()Ljava/lang/ProcessBuilder;
astore 3
4: aload 0
getfield jdk.internal.editor.external.ExternalEditor.suspendInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
5: aload 3
invokevirtual java.lang.ProcessBuilder.start:()Ljava/lang/Process;
astore 4
start local 4 6: aload 0
getfield jdk.internal.editor.external.ExternalEditor.wait:Z
ifeq 11
7: new java.util.Scanner
dup
getstatic java.lang.System.in:Ljava/io/InputStream;
invokespecial java.util.Scanner.<init>:(Ljava/io/InputStream;)V
astore 5
start local 5 8: aload 0
getfield jdk.internal.editor.external.ExternalEditor.promptForNewLineToEndWait:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
9: aload 5
invokevirtual java.util.Scanner.nextLine:()Ljava/lang/String;
pop
end local 5 10: goto 54
11: StackMap locals: java.lang.String[] java.lang.ProcessBuilder java.lang.Process
StackMap stack:
aload 4
invokevirtual java.lang.Process.waitFor:()I
pop
end local 4 12: goto 54
StackMap locals: jdk.internal.editor.external.ExternalEditor java.lang.String[] java.lang.String[] java.lang.ProcessBuilder
StackMap stack: java.io.IOException
13: astore 4
start local 4 14: aload 0
getfield jdk.internal.editor.external.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process IO failure: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 4 15: aload 0
getfield jdk.internal.editor.external.ExternalEditor.watcher:Ljava/nio/file/WatchService;
invokeinterface java.nio.file.WatchService.close:()V
16: aload 0
getfield jdk.internal.editor.external.ExternalEditor.watchedThread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.join:()V
17: aload 0
invokevirtual jdk.internal.editor.external.ExternalEditor.saveFile:()V
18: goto 25
StackMap locals:
StackMap stack: java.lang.InterruptedException
19: astore 7
start local 7 20: aload 0
getfield jdk.internal.editor.external.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process interrupt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 7
invokevirtual java.lang.InterruptedException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 7 21: aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
goto 65
22: StackMap locals:
StackMap stack: java.lang.Throwable
astore 8
23: aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
24: aload 8
athrow
25: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
26: goto 65
27: StackMap locals:
StackMap stack: java.lang.InterruptedException
astore 4
start local 4 28: aload 0
getfield jdk.internal.editor.external.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process interrupt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
invokevirtual java.lang.InterruptedException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 4 29: aload 0
getfield jdk.internal.editor.external.ExternalEditor.watcher:Ljava/nio/file/WatchService;
invokeinterface java.nio.file.WatchService.close:()V
30: aload 0
getfield jdk.internal.editor.external.ExternalEditor.watchedThread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.join:()V
31: aload 0
invokevirtual jdk.internal.editor.external.ExternalEditor.saveFile:()V
32: goto 39
StackMap locals:
StackMap stack: java.lang.InterruptedException
33: astore 7
start local 7 34: aload 0
getfield jdk.internal.editor.external.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process interrupt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 7
invokevirtual java.lang.InterruptedException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 7 35: aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
goto 65
36: StackMap locals:
StackMap stack: java.lang.Throwable
astore 8
37: aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
38: aload 8
athrow
39: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
40: goto 65
41: StackMap locals:
StackMap stack: java.lang.Throwable
astore 6
42: aload 0
getfield jdk.internal.editor.external.ExternalEditor.watcher:Ljava/nio/file/WatchService;
invokeinterface java.nio.file.WatchService.close:()V
43: aload 0
getfield jdk.internal.editor.external.ExternalEditor.watchedThread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.join:()V
44: aload 0
invokevirtual jdk.internal.editor.external.ExternalEditor.saveFile:()V
45: goto 52
StackMap locals: jdk.internal.editor.external.ExternalEditor java.lang.String[] java.lang.String[] java.lang.ProcessBuilder top top java.lang.Throwable
StackMap stack: java.lang.InterruptedException
46: astore 7
start local 7 47: aload 0
getfield jdk.internal.editor.external.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process interrupt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 7
invokevirtual java.lang.InterruptedException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 7 48: aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
goto 53
49: StackMap locals:
StackMap stack: java.lang.Throwable
astore 8
50: aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
51: aload 8
athrow
52: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
53: StackMap locals:
StackMap stack:
aload 6
athrow
54: StackMap locals: jdk.internal.editor.external.ExternalEditor java.lang.String[] java.lang.String[] java.lang.ProcessBuilder
StackMap stack:
aload 0
getfield jdk.internal.editor.external.ExternalEditor.watcher:Ljava/nio/file/WatchService;
invokeinterface java.nio.file.WatchService.close:()V
55: aload 0
getfield jdk.internal.editor.external.ExternalEditor.watchedThread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.join:()V
56: aload 0
invokevirtual jdk.internal.editor.external.ExternalEditor.saveFile:()V
57: goto 64
StackMap locals:
StackMap stack: java.lang.InterruptedException
58: astore 7
start local 7 59: aload 0
getfield jdk.internal.editor.external.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process interrupt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 7
invokevirtual java.lang.InterruptedException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 7 60: aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
goto 65
61: StackMap locals:
StackMap stack: java.lang.Throwable
astore 8
62: aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
63: aload 8
athrow
64: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.editor.external.ExternalEditor.resumeInteractiveInput:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
65: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 66 0 this Ljdk/internal/editor/external/ExternalEditor;
0 66 1 cmd [Ljava/lang/String;
1 66 2 params [Ljava/lang/String;
3 66 3 pb Ljava/lang/ProcessBuilder;
6 12 4 process Ljava/lang/Process;
8 10 5 scanner Ljava/util/Scanner;
14 15 4 ex Ljava/io/IOException;
28 29 4 ex Ljava/lang/InterruptedException;
20 21 7 ex Ljava/lang/InterruptedException;
34 35 7 ex Ljava/lang/InterruptedException;
47 48 7 ex Ljava/lang/InterruptedException;
59 60 7 ex Ljava/lang/InterruptedException;
Exception table:
from to target type
4 12 13 Class java.io.IOException
15 18 19 Class java.lang.InterruptedException
15 21 22 any
4 12 27 Class java.lang.InterruptedException
29 32 33 Class java.lang.InterruptedException
29 35 36 any
4 15 41 any
27 29 41 any
42 45 46 Class java.lang.InterruptedException
42 48 49 any
54 57 58 Class java.lang.InterruptedException
54 60 61 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
cmd
private void saveFile();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
getfield jdk.internal.editor.external.ExternalEditor.saveHandler:Ljava/util/function/Consumer;
aload 0
getfield jdk.internal.editor.external.ExternalEditor.tmpfile:Ljava/nio/file/Path;
invokestatic java.nio.file.Files.lines:(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
ldc "\n"
ldc ""
ldc "\n"
invokestatic java.util.stream.Collectors.joining:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/util/stream/Collector;
invokeinterface java.util.stream.Stream.collect:(Ljava/util/stream/Collector;)Ljava/lang/Object;
checkcast java.lang.String
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
1: goto 4
StackMap locals:
StackMap stack: java.io.IOException
2: astore 1
start local 1 3: aload 0
getfield jdk.internal.editor.external.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "Failure in read edit file: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 1 4: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/internal/editor/external/ExternalEditor;
3 4 1 ex Ljava/io/IOException;
Exception table:
from to target type
0 1 2 Class java.io.IOException
private void deleteDirectory();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.editor.external.ExternalEditor.dir:Ljava/nio/file/Path;
new jdk.internal.editor.external.ExternalEditor$1
dup
aload 0
invokespecial jdk.internal.editor.external.ExternalEditor$1.<init>:(Ljdk/internal/editor/external/ExternalEditor;)V
invokestatic java.nio.file.Files.walkFileTree:(Ljava/nio/file/Path;Ljava/nio/file/FileVisitor;)Ljava/nio/file/Path;
pop
1: goto 3
StackMap locals:
StackMap stack: java.io.IOException
2: pop
3: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/internal/editor/external/ExternalEditor;
Exception table:
from to target type
0 1 2 Class java.io.IOException
private void lambda$0();
descriptor: ()V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=1, locals=3, args_size=1
start local 0 0: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.editor.external.ExternalEditor.watcher:Ljava/nio/file/WatchService;
invokeinterface java.nio.file.WatchService.take:()Ljava/nio/file/WatchKey;
astore 1
start local 1 1: goto 6
end local 1 StackMap locals:
StackMap stack: java.nio.file.ClosedWatchServiceException
2: pop
3: goto 10
4: StackMap locals:
StackMap stack: java.lang.InterruptedException
pop
5: goto 0
start local 1 6: StackMap locals: java.nio.file.WatchKey
StackMap stack:
aload 1
invokeinterface java.nio.file.WatchKey.pollEvents:()Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
ifne 8
7: aload 0
invokevirtual jdk.internal.editor.external.ExternalEditor.saveFile:()V
8: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.nio.file.WatchKey.reset:()Z
istore 2
start local 2 9: iload 2
ifne 0
end local 2 end local 1 10: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Ljdk/internal/editor/external/ExternalEditor;
1 2 1 key Ljava/nio/file/WatchKey;
6 10 1 key Ljava/nio/file/WatchKey;
9 10 2 valid Z
Exception table:
from to target type
0 1 2 Class java.nio.file.ClosedWatchServiceException
0 1 4 Class java.lang.InterruptedException
}
SourceFile: "ExternalEditor.java"
NestMembers:
jdk.internal.editor.external.ExternalEditor$1
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract Kind = java.nio.file.WatchEvent$Kind of java.nio.file.WatchEvent
jdk.internal.editor.external.ExternalEditor$1