final class jdk.nashorn.tools.jjs.ExternalEditor
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: jdk.nashorn.tools.jjs.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 jdk.nashorn.tools.jjs.Console input;
descriptor: Ljdk/nashorn/tools/jjs/Console;
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
void <init>(java.util.function.Consumer<java.lang.String>, java.util.function.Consumer<java.lang.String>, jdk.nashorn.tools.jjs.Console);
descriptor: (Ljava/util/function/Consumer;Ljava/util/function/Consumer;Ljdk/nashorn/tools/jjs/Console;)V
flags: (0x0000)
Code:
stack=2, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield jdk.nashorn.tools.jjs.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
2: aload 0
aload 2
putfield jdk.nashorn.tools.jjs.ExternalEditor.saveHandler:Ljava/util/function/Consumer;
3: aload 0
aload 3
putfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/nashorn/tools/jjs/ExternalEditor;
0 5 1 errorHandler Ljava/util/function/Consumer<Ljava/lang/String;>;
0 5 2 saveHandler Ljava/util/function/Consumer<Ljava/lang/String;>;
0 5 3 input Ljdk/nashorn/tools/jjs/Console;
Signature: (Ljava/util/function/Consumer<Ljava/lang/String;>;Ljava/util/function/Consumer<Ljava/lang/String;>;Ljdk/nashorn/tools/jjs/Console;)V
MethodParameters:
Name Flags
errorHandler final
saveHandler final
input final
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=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.setupWatch:(Ljava/lang/String;)V
1: aload 0
aload 1
invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.launch:(Ljava/lang/String;)V
2: goto 5
StackMap locals:
StackMap stack: java.io.IOException
3: astore 3
start local 3 4: aload 0
getfield jdk.nashorn.tools.jjs.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: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/nashorn/tools/jjs/ExternalEditor;
0 6 1 cmd Ljava/lang/String;
0 6 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
MethodParameters:
Name Flags
cmd final
initialText final
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.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
1: aload 0
ldc "REPL"
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.nashorn.tools.jjs.ExternalEditor.dir:Ljava/nio/file/Path;
2: aload 0
aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.dir:Ljava/nio/file/Path;
aconst_null
ldc ".js"
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.nashorn.tools.jjs.ExternalEditor.tmpfile:Ljava/nio/file/Path;
3: aload 0
getfield jdk.nashorn.tools.jjs.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.nashorn.tools.jjs.ExternalEditor.dir:Ljava/nio/file/Path;
aload 0
getfield jdk.nashorn.tools.jjs.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/nashorn/tools/jjs/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/nashorn/tools/jjs/ExternalEditor.lambda$0()V (7)
()V
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
putfield jdk.nashorn.tools.jjs.ExternalEditor.watchedThread:Ljava/lang/Thread;
10: aload 0
getfield jdk.nashorn.tools.jjs.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/nashorn/tools/jjs/ExternalEditor;
0 12 1 initialText Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
initialText final
private void launch(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=7, args_size=2
start local 0 start local 1 0: new java.lang.ProcessBuilder
dup
iconst_2
anewarray java.lang.String
dup
iconst_0
aload 1
aastore
dup
iconst_1
aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.tmpfile:Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
aastore
invokespecial java.lang.ProcessBuilder.<init>:([Ljava/lang/String;)V
astore 2
start local 2 1: aload 2
invokevirtual java.lang.ProcessBuilder.inheritIO:()Ljava/lang/ProcessBuilder;
astore 2
2: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.suspend:()V
3: aload 2
invokevirtual java.lang.ProcessBuilder.start:()Ljava/lang/Process;
astore 3
start local 3 4: aload 3
invokevirtual java.lang.Process.waitFor:()I
pop
end local 3 5: goto 47
StackMap locals: jdk.nashorn.tools.jjs.ExternalEditor java.lang.String java.lang.ProcessBuilder
StackMap stack: java.io.IOException
6: astore 3
start local 3 7: aload 0
getfield jdk.nashorn.tools.jjs.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 3
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 3 8: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
invokeinterface java.nio.file.WatchService.close:()V
9: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.watchedThread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.join:()V
10: aload 0
invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.saveFile:()V
11: goto 18
StackMap locals:
StackMap stack: java.lang.InterruptedException
12: astore 5
start local 5 13: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process interrupt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
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 5 14: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
goto 58
15: StackMap locals:
StackMap stack: java.lang.Throwable
astore 6
16: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
17: aload 6
athrow
18: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
19: goto 58
20: StackMap locals:
StackMap stack: java.lang.InterruptedException
astore 3
start local 3 21: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process interrupt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
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 3 22: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
invokeinterface java.nio.file.WatchService.close:()V
23: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.watchedThread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.join:()V
24: aload 0
invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.saveFile:()V
25: goto 32
StackMap locals:
StackMap stack: java.lang.InterruptedException
26: astore 5
start local 5 27: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process interrupt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
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 5 28: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
goto 58
29: StackMap locals:
StackMap stack: java.lang.Throwable
astore 6
30: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
31: aload 6
athrow
32: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
33: goto 58
34: StackMap locals:
StackMap stack: java.lang.Throwable
astore 4
35: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
invokeinterface java.nio.file.WatchService.close:()V
36: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.watchedThread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.join:()V
37: aload 0
invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.saveFile:()V
38: goto 45
StackMap locals: jdk.nashorn.tools.jjs.ExternalEditor java.lang.String java.lang.ProcessBuilder top java.lang.Throwable
StackMap stack: java.lang.InterruptedException
39: astore 5
start local 5 40: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process interrupt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
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 5 41: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
goto 46
42: StackMap locals:
StackMap stack: java.lang.Throwable
astore 6
43: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
44: aload 6
athrow
45: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
46: StackMap locals:
StackMap stack:
aload 4
athrow
47: StackMap locals: jdk.nashorn.tools.jjs.ExternalEditor java.lang.String java.lang.ProcessBuilder
StackMap stack:
aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
invokeinterface java.nio.file.WatchService.close:()V
48: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.watchedThread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.join:()V
49: aload 0
invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.saveFile:()V
50: goto 57
StackMap locals:
StackMap stack: java.lang.InterruptedException
51: astore 5
start local 5 52: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "process interrupt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
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 5 53: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
goto 58
54: StackMap locals:
StackMap stack: java.lang.Throwable
astore 6
55: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
56: aload 6
athrow
57: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
58: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 59 0 this Ljdk/nashorn/tools/jjs/ExternalEditor;
0 59 1 cmd Ljava/lang/String;
1 59 2 pb Ljava/lang/ProcessBuilder;
4 5 3 process Ljava/lang/Process;
7 8 3 ex Ljava/io/IOException;
21 22 3 ex Ljava/lang/InterruptedException;
13 14 5 ex Ljava/lang/InterruptedException;
27 28 5 ex Ljava/lang/InterruptedException;
40 41 5 ex Ljava/lang/InterruptedException;
52 53 5 ex Ljava/lang/InterruptedException;
Exception table:
from to target type
2 5 6 Class java.io.IOException
8 11 12 Class java.lang.InterruptedException
8 14 15 any
2 5 20 Class java.lang.InterruptedException
22 25 26 Class java.lang.InterruptedException
22 28 29 any
2 8 34 any
20 22 34 any
35 38 39 Class java.lang.InterruptedException
35 41 42 any
47 50 51 Class java.lang.InterruptedException
47 53 54 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
cmd final
private void saveFile();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=1
start local 0 0: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.tmpfile:Ljava/nio/file/Path;
invokestatic java.nio.file.Files.readAllLines:(Ljava/nio/file/Path;)Ljava/util/List;
astore 1
start local 1 1: goto 5
end local 1 StackMap locals:
StackMap stack: java.io.IOException
2: astore 2
start local 2 3: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
new java.lang.StringBuilder
dup
ldc "Failure read edit file: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
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
4: return
end local 2 start local 1 5: StackMap locals: java.util.List
StackMap stack:
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 2
start local 2 6: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 4
goto 10
StackMap locals: jdk.nashorn.tools.jjs.ExternalEditor java.util.List java.lang.StringBuilder top java.util.Iterator
StackMap stack:
7: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 3
start local 3 8: aload 2
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
9: aload 2
bipush 10
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
end local 3 10: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 7
11: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.saveHandler:Ljava/util/function/Consumer;
aload 2
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
12: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Ljdk/nashorn/tools/jjs/ExternalEditor;
1 2 1 lines Ljava/util/List<Ljava/lang/String;>;
5 13 1 lines Ljava/util/List<Ljava/lang/String;>;
3 5 2 ex Ljava/io/IOException;
6 13 2 sb Ljava/lang/StringBuilder;
8 10 3 ln Ljava/lang/String;
Exception table:
from to target type
0 1 2 Class java.io.IOException
static void edit(java.lang.String, java.util.function.Consumer<java.lang.String>, java.lang.String, java.util.function.Consumer<java.lang.String>, jdk.nashorn.tools.jjs.Console);
descriptor: (Ljava/lang/String;Ljava/util/function/Consumer;Ljava/lang/String;Ljava/util/function/Consumer;Ljdk/nashorn/tools/jjs/Console;)V
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=6, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: new jdk.nashorn.tools.jjs.ExternalEditor
dup
aload 1
aload 3
aload 4
invokespecial jdk.nashorn.tools.jjs.ExternalEditor.<init>:(Ljava/util/function/Consumer;Ljava/util/function/Consumer;Ljdk/nashorn/tools/jjs/Console;)V
astore 5
start local 5 1: aload 5
aload 0
aload 2
invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.edit:(Ljava/lang/String;Ljava/lang/String;)V
2: return
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 3 0 cmd Ljava/lang/String;
0 3 1 errorHandler Ljava/util/function/Consumer<Ljava/lang/String;>;
0 3 2 initialText Ljava/lang/String;
0 3 3 saveHandler Ljava/util/function/Consumer<Ljava/lang/String;>;
0 3 4 input Ljdk/nashorn/tools/jjs/Console;
1 3 5 ed Ljdk/nashorn/tools/jjs/ExternalEditor;
Signature: (Ljava/lang/String;Ljava/util/function/Consumer<Ljava/lang/String;>;Ljava/lang/String;Ljava/util/function/Consumer<Ljava/lang/String;>;Ljdk/nashorn/tools/jjs/Console;)V
MethodParameters:
Name Flags
cmd final
errorHandler final
initialText final
saveHandler final
input final
private void lambda$0();
descriptor: ()V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.tools.jjs.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 12
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 9
7: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
invokevirtual jdk.nashorn.tools.jjs.Console.terminalEditorRunning:()Z
ifne 9
8: aload 0
invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.saveFile:()V
9: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.nio.file.WatchKey.reset:()Z
istore 2
start local 2 10: iload 2
ifne 0
11: aload 0
getfield jdk.nashorn.tools.jjs.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
ldc "Invalid key"
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 2 end local 1 12: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Ljdk/nashorn/tools/jjs/ExternalEditor;
1 2 1 key Ljava/nio/file/WatchKey;
6 12 1 key Ljava/nio/file/WatchKey;
10 12 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"
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