public final class jdk.jpackage.internal.ToolValidator
  minor version: 0
  major version: 59
  flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
  this_class: jdk.jpackage.internal.ToolValidator
  super_class: java.lang.Object
{
  private final java.nio.file.Path toolPath;
    descriptor: Ljava/nio/file/Path;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private java.util.List<java.lang.String> args;
    descriptor: Ljava/util/List;
    flags: (0x0002) ACC_PRIVATE
    Signature: Ljava/util/List<Ljava/lang/String;>;

  private java.lang.Comparable<java.lang.String> minimalVersion;
    descriptor: Ljava/lang/Comparable;
    flags: (0x0002) ACC_PRIVATE
    Signature: Ljava/lang/Comparable<Ljava/lang/String;>;

  private java.util.function.Function<java.util.stream.Stream<java.lang.String>, java.lang.String> versionParser;
    descriptor: Ljava/util/function/Function;
    flags: (0x0002) ACC_PRIVATE
    Signature: Ljava/util/function/Function<Ljava/util/stream/Stream<Ljava/lang/String;>;Ljava/lang/String;>;

  private java.util.function.BiFunction<java.lang.String, java.io.IOException, jdk.jpackage.internal.ConfigException> toolNotFoundErrorHandler;
    descriptor: Ljava/util/function/BiFunction;
    flags: (0x0002) ACC_PRIVATE
    Signature: Ljava/util/function/BiFunction<Ljava/lang/String;Ljava/io/IOException;Ljdk/jpackage/internal/ConfigException;>;

  private java.util.function.BiFunction<java.lang.String, java.lang.String, jdk.jpackage.internal.ConfigException> toolOldVersionErrorHandler;
    descriptor: Ljava/util/function/BiFunction;
    flags: (0x0002) ACC_PRIVATE
    Signature: Ljava/util/function/BiFunction<Ljava/lang/String;Ljava/lang/String;Ljdk/jpackage/internal/ConfigException;>;

  void <init>(java.lang.String);
    descriptor: (Ljava/lang/String;)V
    flags: (0x0000) 
    Code:
      stack=3, locals=2, args_size=2
        start local 0 // jdk.jpackage.internal.ToolValidator this
        start local 1 // java.lang.String tool
         0: .line 41
            aload 0 /* this */
            aload 1 /* tool */
            iconst_0
            anewarray java.lang.String
            invokestatic java.nio.file.Path.of:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
            invokespecial jdk.jpackage.internal.ToolValidator.<init>:(Ljava/nio/file/Path;)V
         1: .line 42
            return
        end local 1 // java.lang.String tool
        end local 0 // jdk.jpackage.internal.ToolValidator this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/jpackage/internal/ToolValidator;
            0    2     1  tool  Ljava/lang/String;
    MethodParameters:
      Name  Flags
      tool  

  void <init>(java.nio.file.Path);
    descriptor: (Ljava/nio/file/Path;)V
    flags: (0x0000) 
    Code:
      stack=5, locals=2, args_size=2
        start local 0 // jdk.jpackage.internal.ToolValidator this
        start local 1 // java.nio.file.Path toolPath
         0: .line 44
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 45
            aload 0 /* this */
            aload 1 /* toolPath */
            putfield jdk.jpackage.internal.ToolValidator.toolPath:Ljava/nio/file/Path;
         2: .line 46
            aload 0 /* this */
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            putfield jdk.jpackage.internal.ToolValidator.args:Ljava/util/List;
         3: .line 48
            invokestatic jdk.jpackage.internal.Platform.getPlatform:()Ljdk/jpackage/internal/Platform;
            getstatic jdk.jpackage.internal.Platform.LINUX:Ljdk/jpackage/internal/Platform;
            if_acmpne 5
         4: .line 49
            aload 0 /* this */
            iconst_1
            anewarray java.lang.String
            dup
            iconst_0
            ldc "--version"
            aastore
            invokevirtual jdk.jpackage.internal.ToolValidator.setCommandLine:([Ljava/lang/String;)Ljdk/jpackage/internal/ToolValidator;
            pop
         5: .line 52
      StackMap locals: jdk.jpackage.internal.ToolValidator java.nio.file.Path
      StackMap stack:
            aload 0 /* this */
            aconst_null
            invokevirtual jdk.jpackage.internal.ToolValidator.setToolNotFoundErrorHandler:(Ljava/util/function/BiFunction;)Ljdk/jpackage/internal/ToolValidator;
            pop
         6: .line 53
            aload 0 /* this */
            aconst_null
            invokevirtual jdk.jpackage.internal.ToolValidator.setToolOldVersionErrorHandler:(Ljava/util/function/BiFunction;)Ljdk/jpackage/internal/ToolValidator;
            pop
         7: .line 54
            return
        end local 1 // java.nio.file.Path toolPath
        end local 0 // jdk.jpackage.internal.ToolValidator this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0    8     0      this  Ljdk/jpackage/internal/ToolValidator;
            0    8     1  toolPath  Ljava/nio/file/Path;
    MethodParameters:
          Name  Flags
      toolPath  

  jdk.jpackage.internal.ToolValidator setCommandLine(java.lang.String[]);
    descriptor: ([Ljava/lang/String;)Ljdk/jpackage/internal/ToolValidator;
    flags: (0x0080) ACC_VARARGS
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // jdk.jpackage.internal.ToolValidator this
        start local 1 // java.lang.String[] args
         0: .line 57
            aload 0 /* this */
            aload 1 /* args */
            invokestatic java.util.List.of:([Ljava/lang/Object;)Ljava/util/List;
            putfield jdk.jpackage.internal.ToolValidator.args:Ljava/util/List;
         1: .line 58
            aload 0 /* this */
            areturn
        end local 1 // java.lang.String[] args
        end local 0 // jdk.jpackage.internal.ToolValidator this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/jpackage/internal/ToolValidator;
            0    2     1  args  [Ljava/lang/String;
    MethodParameters:
      Name  Flags
      args  

  jdk.jpackage.internal.ToolValidator setMinimalVersion(java.lang.Comparable<java.lang.String>);
    descriptor: (Ljava/lang/Comparable;)Ljdk/jpackage/internal/ToolValidator;
    flags: (0x0000) 
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // jdk.jpackage.internal.ToolValidator this
        start local 1 // java.lang.Comparable v
         0: .line 62
            aload 0 /* this */
            aload 1 /* v */
            putfield jdk.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
         1: .line 63
            aload 0 /* this */
            areturn
        end local 1 // java.lang.Comparable v
        end local 0 // jdk.jpackage.internal.ToolValidator this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/jpackage/internal/ToolValidator;
            0    2     1     v  Ljava/lang/Comparable<Ljava/lang/String;>;
    Signature: (Ljava/lang/Comparable<Ljava/lang/String;>;)Ljdk/jpackage/internal/ToolValidator;
    MethodParameters:
      Name  Flags
      v     

  jdk.jpackage.internal.ToolValidator setVersionParser(java.util.function.Function<java.util.stream.Stream<java.lang.String>, java.lang.String>);
    descriptor: (Ljava/util/function/Function;)Ljdk/jpackage/internal/ToolValidator;
    flags: (0x0000) 
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // jdk.jpackage.internal.ToolValidator this
        start local 1 // java.util.function.Function v
         0: .line 67
            aload 0 /* this */
            aload 1 /* v */
            putfield jdk.jpackage.internal.ToolValidator.versionParser:Ljava/util/function/Function;
         1: .line 68
            aload 0 /* this */
            areturn
        end local 1 // java.util.function.Function v
        end local 0 // jdk.jpackage.internal.ToolValidator this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/jpackage/internal/ToolValidator;
            0    2     1     v  Ljava/util/function/Function<Ljava/util/stream/Stream<Ljava/lang/String;>;Ljava/lang/String;>;
    Signature: (Ljava/util/function/Function<Ljava/util/stream/Stream<Ljava/lang/String;>;Ljava/lang/String;>;)Ljdk/jpackage/internal/ToolValidator;
    MethodParameters:
      Name  Flags
      v     

  jdk.jpackage.internal.ToolValidator setToolNotFoundErrorHandler(java.util.function.BiFunction<java.lang.String, java.io.IOException, jdk.jpackage.internal.ConfigException>);
    descriptor: (Ljava/util/function/BiFunction;)Ljdk/jpackage/internal/ToolValidator;
    flags: (0x0000) 
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // jdk.jpackage.internal.ToolValidator this
        start local 1 // java.util.function.BiFunction v
         0: .line 73
            aload 0 /* this */
            aload 1 /* v */
            putfield jdk.jpackage.internal.ToolValidator.toolNotFoundErrorHandler:Ljava/util/function/BiFunction;
         1: .line 74
            aload 0 /* this */
            areturn
        end local 1 // java.util.function.BiFunction v
        end local 0 // jdk.jpackage.internal.ToolValidator this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/jpackage/internal/ToolValidator;
            0    2     1     v  Ljava/util/function/BiFunction<Ljava/lang/String;Ljava/io/IOException;Ljdk/jpackage/internal/ConfigException;>;
    Signature: (Ljava/util/function/BiFunction<Ljava/lang/String;Ljava/io/IOException;Ljdk/jpackage/internal/ConfigException;>;)Ljdk/jpackage/internal/ToolValidator;
    MethodParameters:
      Name  Flags
      v     

  jdk.jpackage.internal.ToolValidator setToolOldVersionErrorHandler(java.util.function.BiFunction<java.lang.String, java.lang.String, jdk.jpackage.internal.ConfigException>);
    descriptor: (Ljava/util/function/BiFunction;)Ljdk/jpackage/internal/ToolValidator;
    flags: (0x0000) 
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // jdk.jpackage.internal.ToolValidator this
        start local 1 // java.util.function.BiFunction v
         0: .line 78
            aload 0 /* this */
            aload 1 /* v */
            putfield jdk.jpackage.internal.ToolValidator.toolOldVersionErrorHandler:Ljava/util/function/BiFunction;
         1: .line 79
            aload 0 /* this */
            areturn
        end local 1 // java.util.function.BiFunction v
        end local 0 // jdk.jpackage.internal.ToolValidator this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/jpackage/internal/ToolValidator;
            0    2     1     v  Ljava/util/function/BiFunction<Ljava/lang/String;Ljava/lang/String;Ljdk/jpackage/internal/ConfigException;>;
    Signature: (Ljava/util/function/BiFunction<Ljava/lang/String;Ljava/lang/String;Ljdk/jpackage/internal/ConfigException;>;)Ljdk/jpackage/internal/ToolValidator;
    MethodParameters:
      Name  Flags
      v     

  jdk.jpackage.internal.ConfigException validate();
    descriptor: ()Ljdk/jpackage/internal/ConfigException;
    flags: (0x0000) 
    Code:
      stack=8, locals=6, args_size=1
        start local 0 // jdk.jpackage.internal.ToolValidator this
         0: .line 83
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 1 /* cmdline */
        start local 1 // java.util.List cmdline
         1: .line 84
            aload 1 /* cmdline */
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.toolPath:Ljava/nio/file/Path;
            invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
         2: .line 85
            aload 1 /* cmdline */
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.args:Ljava/util/List;
            invokeinterface java.util.List.addAll:(Ljava/util/Collection;)Z
            pop
         3: .line 87
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.toolPath:Ljava/nio/file/Path;
            invokestatic jdk.jpackage.internal.IOUtils.getFileName:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
            invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
            astore 2 /* name */
        start local 2 // java.lang.String name
         4: .line 89
            new java.lang.ProcessBuilder
            dup
            aload 1 /* cmdline */
            invokespecial java.lang.ProcessBuilder.<init>:(Ljava/util/List;)V
            astore 3 /* pb */
        start local 3 // java.lang.ProcessBuilder pb
         5: .line 90
            new java.util.concurrent.atomic.AtomicBoolean
            dup
            invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:()V
            astore 4 /* canUseTool */
        start local 4 // java.util.concurrent.atomic.AtomicBoolean canUseTool
         6: .line 91
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
            ifnonnull 8
         7: .line 93
            aload 4 /* canUseTool */
            iconst_1
            invokevirtual java.util.concurrent.atomic.AtomicBoolean.setPlain:(Z)V
         8: .line 96
      StackMap locals: jdk.jpackage.internal.ToolValidator java.util.List java.lang.String java.lang.ProcessBuilder java.util.concurrent.atomic.AtomicBoolean
      StackMap stack:
            iconst_1
            anewarray java.lang.String
            astore 5 /* version */
        start local 5 // java.lang.String[] version
         9: .line 97
            aload 3 /* pb */
            invokestatic jdk.jpackage.internal.Executor.of:(Ljava/lang/ProcessBuilder;)Ljdk/jpackage/internal/Executor;
            iconst_1
            invokevirtual jdk.jpackage.internal.Executor.setQuiet:(Z)Ljdk/jpackage/internal/Executor;
            aload 0 /* this */
            aload 5 /* version */
            aload 4 /* canUseTool */
            invokedynamic accept(Ljdk/jpackage/internal/ToolValidator;[Ljava/lang/String;Ljava/util/concurrent/atomic/AtomicBoolean;)Ljava/util/function/Consumer;
              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:
                  (Ljava/lang/Object;)V
                  jdk/jpackage/internal/ToolValidator.lambda$0([Ljava/lang/String;Ljava/util/concurrent/atomic/AtomicBoolean;Ljava/util/stream/Stream;)V (7)
                  (Ljava/util/stream/Stream;)V
            invokevirtual jdk.jpackage.internal.Executor.setOutputConsumer:(Ljava/util/function/Consumer;)Ljdk/jpackage/internal/Executor;
        10: .line 104
            invokevirtual jdk.jpackage.internal.Executor.execute:()I
            pop
        11: .line 106
            aload 4 /* canUseTool */
            invokevirtual java.util.concurrent.atomic.AtomicBoolean.getPlain:()Z
            ifne 41
        12: .line 107
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.toolOldVersionErrorHandler:Ljava/util/function/BiFunction;
            ifnull 15
        13: .line 108
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.toolOldVersionErrorHandler:Ljava/util/function/BiFunction;
            aload 2 /* name */
            aload 5 /* version */
            iconst_0
            aaload
            invokeinterface java.util.function.BiFunction.apply:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            checkcast jdk.jpackage.internal.ConfigException
        14: areturn
        15: .line 110
      StackMap locals: java.lang.String[]
      StackMap stack:
            new jdk.jpackage.internal.ConfigException
            dup
        16: .line 111
            ldc "error.tool-old-version"
        17: .line 110
            invokestatic jdk.jpackage.internal.I18N.getString:(Ljava/lang/String;)Ljava/lang/String;
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
        18: .line 111
            aload 2 /* name */
            aastore
            dup
            iconst_1
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
            aastore
        19: .line 110
            invokestatic java.text.MessageFormat.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
        20: .line 113
            ldc "error.tool-old-version.advice"
        21: .line 112
            invokestatic jdk.jpackage.internal.I18N.getString:(Ljava/lang/String;)Ljava/lang/String;
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
        22: .line 113
            aload 2 /* name */
            aastore
            dup
            iconst_1
        23: .line 114
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
            aastore
        24: .line 112
            invokestatic java.text.MessageFormat.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
        25: .line 110
            invokespecial jdk.jpackage.internal.ConfigException.<init>:(Ljava/lang/String;Ljava/lang/String;)V
        26: areturn
        end local 5 // java.lang.String[] version
        end local 4 // java.util.concurrent.atomic.AtomicBoolean canUseTool
        end local 3 // java.lang.ProcessBuilder pb
        27: .line 116
      StackMap locals: jdk.jpackage.internal.ToolValidator java.util.List java.lang.String
      StackMap stack: java.io.IOException
            astore 3 /* e */
        start local 3 // java.io.IOException e
        28: .line 117
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.toolNotFoundErrorHandler:Ljava/util/function/BiFunction;
            ifnull 30
        29: .line 118
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.toolNotFoundErrorHandler:Ljava/util/function/BiFunction;
            aload 2 /* name */
            aload 3 /* e */
            invokeinterface java.util.function.BiFunction.apply:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            checkcast jdk.jpackage.internal.ConfigException
            areturn
        30: .line 120
      StackMap locals: java.io.IOException
      StackMap stack:
            new jdk.jpackage.internal.ConfigException
            dup
        31: .line 121
            ldc "error.tool-not-found"
        32: .line 120
            invokestatic jdk.jpackage.internal.I18N.getString:(Ljava/lang/String;)Ljava/lang/String;
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
        33: .line 121
            aload 2 /* name */
            aastore
            dup
            iconst_1
            aload 3 /* e */
            invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
            aastore
        34: .line 120
            invokestatic java.text.MessageFormat.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
        35: .line 123
            ldc "error.tool-not-found.advice"
        36: .line 122
            invokestatic jdk.jpackage.internal.I18N.getString:(Ljava/lang/String;)Ljava/lang/String;
            iconst_1
            anewarray java.lang.Object
            dup
            iconst_0
        37: .line 123
            aload 2 /* name */
            aastore
        38: .line 122
            invokestatic java.text.MessageFormat.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
        39: .line 123
            aload 3 /* e */
        40: .line 120
            invokespecial jdk.jpackage.internal.ConfigException.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
            areturn
        end local 3 // java.io.IOException e
        41: .line 127
      StackMap locals:
      StackMap stack:
            aconst_null
            areturn
        end local 2 // java.lang.String name
        end local 1 // java.util.List cmdline
        end local 0 // jdk.jpackage.internal.ToolValidator this
      LocalVariableTable:
        Start  End  Slot        Name  Signature
            0   42     0        this  Ljdk/jpackage/internal/ToolValidator;
            1   42     1     cmdline  Ljava/util/List<Ljava/lang/String;>;
            4   42     2        name  Ljava/lang/String;
            5   27     3          pb  Ljava/lang/ProcessBuilder;
            6   27     4  canUseTool  Ljava/util/concurrent/atomic/AtomicBoolean;
            9   27     5     version  [Ljava/lang/String;
           28   41     3           e  Ljava/io/IOException;
      Exception table:
        from    to  target  type
           4    14      27  Class java.io.IOException
          15    26      27  Class java.io.IOException

  private void lambda$0(java.lang.String[], java.util.concurrent.atomic.AtomicBoolean, java.util.stream.Stream);
    descriptor: ([Ljava/lang/String;Ljava/util/concurrent/atomic/AtomicBoolean;Ljava/util/stream/Stream;)V
    flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
    Code:
      stack=4, locals=4, args_size=4
        start local 0 // jdk.jpackage.internal.ToolValidator this
        start local 3 // java.util.stream.Stream lines
         0: .line 98
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.versionParser:Ljava/util/function/Function;
            ifnull 4
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
            ifnull 4
         1: .line 99
            aload 1
            iconst_0
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.versionParser:Ljava/util/function/Function;
            aload 3 /* lines */
            invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast java.lang.String
            aastore
         2: .line 100
            aload 0 /* this */
            getfield jdk.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
            aload 1
            iconst_0
            aaload
            invokeinterface java.lang.Comparable.compareTo:(Ljava/lang/Object;)I
            ifge 4
         3: .line 101
            aload 2
            iconst_1
            invokevirtual java.util.concurrent.atomic.AtomicBoolean.setPlain:(Z)V
         4: .line 104
      StackMap locals:
      StackMap stack:
            return
        end local 3 // java.util.stream.Stream lines
        end local 0 // jdk.jpackage.internal.ToolValidator this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    5     0   this  Ljdk/jpackage/internal/ToolValidator;
            0    5     3  lines  Ljava/util/stream/Stream<Ljava/lang/String;>;
}
SourceFile: "ToolValidator.java"
InnerClasses:
  public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles