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 // jdk.nashorn.tools.jjs.ExternalEditor this
        start local 1 // java.util.function.Consumer errorHandler
        start local 2 // java.util.function.Consumer saveHandler
        start local 3 // jdk.nashorn.tools.jjs.Console input
         0: .line 52
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 53
            aload 0 /* this */
            aload 1 /* errorHandler */
            putfield jdk.nashorn.tools.jjs.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
         2: .line 54
            aload 0 /* this */
            aload 2 /* saveHandler */
            putfield jdk.nashorn.tools.jjs.ExternalEditor.saveHandler:Ljava/util/function/Consumer;
         3: .line 55
            aload 0 /* this */
            aload 3 /* input */
            putfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
         4: .line 56
            return
        end local 3 // jdk.nashorn.tools.jjs.Console input
        end local 2 // java.util.function.Consumer saveHandler
        end local 1 // java.util.function.Consumer errorHandler
        end local 0 // jdk.nashorn.tools.jjs.ExternalEditor this
      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 // jdk.nashorn.tools.jjs.ExternalEditor this
        start local 1 // java.lang.String cmd
        start local 2 // java.lang.String initialText
         0: .line 60
            aload 0 /* this */
            aload 2 /* initialText */
            invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.setupWatch:(Ljava/lang/String;)V
         1: .line 61
            aload 0 /* this */
            aload 1 /* cmd */
            invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.launch:(Ljava/lang/String;)V
         2: .line 62
            goto 5
      StackMap locals:
      StackMap stack: java.io.IOException
         3: astore 3 /* ex */
        start local 3 // java.io.IOException ex
         4: .line 63
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.errorHandler:Ljava/util/function/Consumer;
            aload 3 /* ex */
            invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
            invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
        end local 3 // java.io.IOException ex
         5: .line 65
      StackMap locals:
      StackMap stack:
            return
        end local 2 // java.lang.String initialText
        end local 1 // java.lang.String cmd
        end local 0 // jdk.nashorn.tools.jjs.ExternalEditor this
      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 // jdk.nashorn.tools.jjs.ExternalEditor this
        start local 1 // java.lang.String initialText
         0: .line 71
            aload 0 /* this */
            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: .line 72
            aload 0 /* this */
            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: .line 73
            aload 0 /* this */
            aload 0 /* this */
            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: .line 74
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.tmpfile:Ljava/nio/file/Path;
            aload 1 /* initialText */
            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: .line 75
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.dir:Ljava/nio/file/Path;
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
            iconst_3
            anewarray java.nio.file.WatchEvent$Kind
            dup
            iconst_0
         5: .line 76
            getstatic java.nio.file.StandardWatchEventKinds.ENTRY_CREATE:Ljava/nio/file/WatchEvent$Kind;
            aastore
            dup
            iconst_1
         6: .line 77
            getstatic java.nio.file.StandardWatchEventKinds.ENTRY_DELETE:Ljava/nio/file/WatchEvent$Kind;
            aastore
            dup
            iconst_2
         7: .line 78
            getstatic java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY:Ljava/nio/file/WatchEvent$Kind;
            aastore
         8: .line 75
            invokeinterface java.nio.file.Path.register:(Ljava/nio/file/WatchService;[Ljava/nio/file/WatchEvent$Kind;)Ljava/nio/file/WatchKey;
            pop
         9: .line 79
            aload 0 /* this */
            new java.lang.Thread
            dup
            aload 0 /* this */
            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: .line 103
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watchedThread:Ljava/lang/Thread;
            invokevirtual java.lang.Thread.start:()V
        11: .line 104
            return
        end local 1 // java.lang.String initialText
        end local 0 // jdk.nashorn.tools.jjs.ExternalEditor this
      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 // jdk.nashorn.tools.jjs.ExternalEditor this
        start local 1 // java.lang.String cmd
         0: .line 107
            new java.lang.ProcessBuilder
            dup
            iconst_2
            anewarray java.lang.String
            dup
            iconst_0
            aload 1 /* cmd */
            aastore
            dup
            iconst_1
            aload 0 /* this */
            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 /* pb */
        start local 2 // java.lang.ProcessBuilder pb
         1: .line 108
            aload 2 /* pb */
            invokevirtual java.lang.ProcessBuilder.inheritIO:()Ljava/lang/ProcessBuilder;
            astore 2 /* pb */
         2: .line 111
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.suspend:()V
         3: .line 112
            aload 2 /* pb */
            invokevirtual java.lang.ProcessBuilder.start:()Ljava/lang/Process;
            astore 3 /* process */
        start local 3 // java.lang.Process process
         4: .line 113
            aload 3 /* process */
            invokevirtual java.lang.Process.waitFor:()I
            pop
        end local 3 // java.lang.Process process
         5: .line 114
            goto 47
      StackMap locals: jdk.nashorn.tools.jjs.ExternalEditor java.lang.String java.lang.ProcessBuilder
      StackMap stack: java.io.IOException
         6: astore 3 /* ex */
        start local 3 // java.io.IOException ex
         7: .line 115
            aload 0 /* this */
            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 /* ex */
            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 // java.io.IOException ex
         8: .line 120
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
            invokeinterface java.nio.file.WatchService.close:()V
         9: .line 121
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watchedThread:Ljava/lang/Thread;
            invokevirtual java.lang.Thread.join:()V
        10: .line 122
            aload 0 /* this */
            invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.saveFile:()V
        11: .line 123
            goto 18
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
        12: astore 5 /* ex */
        start local 5 // java.lang.InterruptedException ex
        13: .line 124
            aload 0 /* this */
            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 /* ex */
            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 // java.lang.InterruptedException ex
        14: .line 126
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
            goto 58
        15: .line 125
      StackMap locals:
      StackMap stack: java.lang.Throwable
            astore 6
        16: .line 126
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
        17: .line 127
            aload 6
            athrow
        18: .line 126
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
        19: .line 127
            goto 58
        20: .line 116
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
            astore 3 /* ex */
        start local 3 // java.lang.InterruptedException ex
        21: .line 117
            aload 0 /* this */
            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 /* ex */
            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 // java.lang.InterruptedException ex
        22: .line 120
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
            invokeinterface java.nio.file.WatchService.close:()V
        23: .line 121
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watchedThread:Ljava/lang/Thread;
            invokevirtual java.lang.Thread.join:()V
        24: .line 122
            aload 0 /* this */
            invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.saveFile:()V
        25: .line 123
            goto 32
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
        26: astore 5 /* ex */
        start local 5 // java.lang.InterruptedException ex
        27: .line 124
            aload 0 /* this */
            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 /* ex */
            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 // java.lang.InterruptedException ex
        28: .line 126
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
            goto 58
        29: .line 125
      StackMap locals:
      StackMap stack: java.lang.Throwable
            astore 6
        30: .line 126
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
        31: .line 127
            aload 6
            athrow
        32: .line 126
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
        33: .line 127
            goto 58
        34: .line 118
      StackMap locals:
      StackMap stack: java.lang.Throwable
            astore 4
        35: .line 120
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
            invokeinterface java.nio.file.WatchService.close:()V
        36: .line 121
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watchedThread:Ljava/lang/Thread;
            invokevirtual java.lang.Thread.join:()V
        37: .line 122
            aload 0 /* this */
            invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.saveFile:()V
        38: .line 123
            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 /* ex */
        start local 5 // java.lang.InterruptedException ex
        40: .line 124
            aload 0 /* this */
            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 /* ex */
            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 // java.lang.InterruptedException ex
        41: .line 126
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
            goto 46
        42: .line 125
      StackMap locals:
      StackMap stack: java.lang.Throwable
            astore 6
        43: .line 126
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
        44: .line 127
            aload 6
            athrow
        45: .line 126
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
        46: .line 128
      StackMap locals:
      StackMap stack:
            aload 4
            athrow
        47: .line 120
      StackMap locals: jdk.nashorn.tools.jjs.ExternalEditor java.lang.String java.lang.ProcessBuilder
      StackMap stack:
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
            invokeinterface java.nio.file.WatchService.close:()V
        48: .line 121
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watchedThread:Ljava/lang/Thread;
            invokevirtual java.lang.Thread.join:()V
        49: .line 122
            aload 0 /* this */
            invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.saveFile:()V
        50: .line 123
            goto 57
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
        51: astore 5 /* ex */
        start local 5 // java.lang.InterruptedException ex
        52: .line 124
            aload 0 /* this */
            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 /* ex */
            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 // java.lang.InterruptedException ex
        53: .line 126
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
            goto 58
        54: .line 125
      StackMap locals:
      StackMap stack: java.lang.Throwable
            astore 6
        55: .line 126
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
        56: .line 127
            aload 6
            athrow
        57: .line 126
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.resume:()V
        58: .line 129
      StackMap locals:
      StackMap stack:
            return
        end local 2 // java.lang.ProcessBuilder pb
        end local 1 // java.lang.String cmd
        end local 0 // jdk.nashorn.tools.jjs.ExternalEditor this
      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 // jdk.nashorn.tools.jjs.ExternalEditor this
         0: .line 134
            aload 0 /* this */
            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 /* lines */
        start local 1 // java.util.List lines
         1: .line 135
            goto 5
        end local 1 // java.util.List lines
      StackMap locals:
      StackMap stack: java.io.IOException
         2: astore 2 /* ex */
        start local 2 // java.io.IOException ex
         3: .line 136
            aload 0 /* this */
            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 /* ex */
            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: .line 137
            return
        end local 2 // java.io.IOException ex
        start local 1 // java.util.List lines
         5: .line 139
      StackMap locals: java.util.List
      StackMap stack:
            new java.lang.StringBuilder
            dup
            invokespecial java.lang.StringBuilder.<init>:()V
            astore 2 /* sb */
        start local 2 // java.lang.StringBuilder sb
         6: .line 140
            aload 1 /* lines */
            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 /* ln */
        start local 3 // java.lang.String ln
         8: .line 141
            aload 2 /* sb */
            aload 3 /* ln */
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            pop
         9: .line 142
            aload 2 /* sb */
            bipush 10
            invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
            pop
        end local 3 // java.lang.String ln
        10: .line 140
      StackMap locals:
      StackMap stack:
            aload 4
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 7
        11: .line 144
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.saveHandler:Ljava/util/function/Consumer;
            aload 2 /* sb */
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
        12: .line 145
            return
        end local 2 // java.lang.StringBuilder sb
        end local 1 // java.util.List lines
        end local 0 // jdk.nashorn.tools.jjs.ExternalEditor this
      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 // java.lang.String cmd
        start local 1 // java.util.function.Consumer errorHandler
        start local 2 // java.lang.String initialText
        start local 3 // java.util.function.Consumer saveHandler
        start local 4 // jdk.nashorn.tools.jjs.Console input
         0: .line 149
            new jdk.nashorn.tools.jjs.ExternalEditor
            dup
            aload 1 /* errorHandler */
            aload 3 /* saveHandler */
            aload 4 /* input */
            invokespecial jdk.nashorn.tools.jjs.ExternalEditor.<init>:(Ljava/util/function/Consumer;Ljava/util/function/Consumer;Ljdk/nashorn/tools/jjs/Console;)V
            astore 5 /* ed */
        start local 5 // jdk.nashorn.tools.jjs.ExternalEditor ed
         1: .line 150
            aload 5 /* ed */
            aload 0 /* cmd */
            aload 2 /* initialText */
            invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.edit:(Ljava/lang/String;Ljava/lang/String;)V
         2: .line 151
            return
        end local 5 // jdk.nashorn.tools.jjs.ExternalEditor ed
        end local 4 // jdk.nashorn.tools.jjs.Console input
        end local 3 // java.util.function.Consumer saveHandler
        end local 2 // java.lang.String initialText
        end local 1 // java.util.function.Consumer errorHandler
        end local 0 // java.lang.String cmd
      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 // jdk.nashorn.tools.jjs.ExternalEditor this
         0: .line 83
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.watcher:Ljava/nio/file/WatchService;
            invokeinterface java.nio.file.WatchService.take:()Ljava/nio/file/WatchKey;
            astore 1 /* key */
        start local 1 // java.nio.file.WatchKey key
         1: .line 84
            goto 6
        end local 1 // java.nio.file.WatchKey key
      StackMap locals:
      StackMap stack: java.nio.file.ClosedWatchServiceException
         2: pop
         3: .line 85
            goto 12
         4: .line 86
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
            pop
         5: .line 87
            goto 0
        start local 1 // java.nio.file.WatchKey key
         6: .line 90
      StackMap locals: java.nio.file.WatchKey
      StackMap stack:
            aload 1 /* key */
            invokeinterface java.nio.file.WatchKey.pollEvents:()Ljava/util/List;
            invokeinterface java.util.List.isEmpty:()Z
            ifne 9
         7: .line 91
            aload 0 /* this */
            getfield jdk.nashorn.tools.jjs.ExternalEditor.input:Ljdk/nashorn/tools/jjs/Console;
            invokevirtual jdk.nashorn.tools.jjs.Console.terminalEditorRunning:()Z
            ifne 9
         8: .line 92
            aload 0 /* this */
            invokevirtual jdk.nashorn.tools.jjs.ExternalEditor.saveFile:()V
         9: .line 96
      StackMap locals:
      StackMap stack:
            aload 1 /* key */
            invokeinterface java.nio.file.WatchKey.reset:()Z
            istore 2 /* valid */
        start local 2 // boolean valid
        10: .line 97
            iload 2 /* valid */
            ifne 0
        11: .line 98
            aload 0 /* this */
            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 // boolean valid
        end local 1 // java.nio.file.WatchKey key
        12: .line 102
      StackMap locals:
      StackMap stack:
            return
        end local 0 // jdk.nashorn.tools.jjs.ExternalEditor this
      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