public final class jdk.incubator.jpackage.internal.ToolValidator
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.incubator.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.incubator.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/incubator/jpackage/internal/ConfigException;>;
private java.util.function.BiFunction<java.lang.String, java.lang.String, jdk.incubator.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/incubator/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 start local 1 0: aload 0
aload 1
iconst_0
anewarray java.lang.String
invokestatic java.nio.file.Path.of:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
invokespecial jdk.incubator.jpackage.internal.ToolValidator.<init>:(Ljava/nio/file/Path;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/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 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield jdk.incubator.jpackage.internal.ToolValidator.toolPath:Ljava/nio/file/Path;
2: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield jdk.incubator.jpackage.internal.ToolValidator.args:Ljava/util/List;
3: invokestatic jdk.incubator.jpackage.internal.Platform.getPlatform:()Ljdk/incubator/jpackage/internal/Platform;
getstatic jdk.incubator.jpackage.internal.Platform.LINUX:Ljdk/incubator/jpackage/internal/Platform;
if_acmpne 5
4: aload 0
iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "--version"
aastore
invokevirtual jdk.incubator.jpackage.internal.ToolValidator.setCommandLine:([Ljava/lang/String;)Ljdk/incubator/jpackage/internal/ToolValidator;
pop
5: StackMap locals: jdk.incubator.jpackage.internal.ToolValidator java.nio.file.Path
StackMap stack:
aload 0
aconst_null
invokevirtual jdk.incubator.jpackage.internal.ToolValidator.setToolNotFoundErrorHandler:(Ljava/util/function/BiFunction;)Ljdk/incubator/jpackage/internal/ToolValidator;
pop
6: aload 0
aconst_null
invokevirtual jdk.incubator.jpackage.internal.ToolValidator.setToolOldVersionErrorHandler:(Ljava/util/function/BiFunction;)Ljdk/incubator/jpackage/internal/ToolValidator;
pop
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/incubator/jpackage/internal/ToolValidator;
0 8 1 toolPath Ljava/nio/file/Path;
MethodParameters:
Name Flags
toolPath
jdk.incubator.jpackage.internal.ToolValidator setCommandLine(java.lang.String[]);
descriptor: ([Ljava/lang/String;)Ljdk/incubator/jpackage/internal/ToolValidator;
flags: (0x0080) ACC_VARARGS
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic java.util.List.of:([Ljava/lang/Object;)Ljava/util/List;
putfield jdk.incubator.jpackage.internal.ToolValidator.args:Ljava/util/List;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/jpackage/internal/ToolValidator;
0 2 1 args [Ljava/lang/String;
MethodParameters:
Name Flags
args
jdk.incubator.jpackage.internal.ToolValidator setMinimalVersion(java.lang.Comparable<java.lang.String>);
descriptor: (Ljava/lang/Comparable;)Ljdk/incubator/jpackage/internal/ToolValidator;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield jdk.incubator.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/jpackage/internal/ToolValidator;
0 2 1 v Ljava/lang/Comparable<Ljava/lang/String;>;
Signature: (Ljava/lang/Comparable<Ljava/lang/String;>;)Ljdk/incubator/jpackage/internal/ToolValidator;
MethodParameters:
Name Flags
v
jdk.incubator.jpackage.internal.ToolValidator setVersionParser(java.util.function.Function<java.util.stream.Stream<java.lang.String>, java.lang.String>);
descriptor: (Ljava/util/function/Function;)Ljdk/incubator/jpackage/internal/ToolValidator;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield jdk.incubator.jpackage.internal.ToolValidator.versionParser:Ljava/util/function/Function;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/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/incubator/jpackage/internal/ToolValidator;
MethodParameters:
Name Flags
v
jdk.incubator.jpackage.internal.ToolValidator setToolNotFoundErrorHandler(java.util.function.BiFunction<java.lang.String, java.io.IOException, jdk.incubator.jpackage.internal.ConfigException>);
descriptor: (Ljava/util/function/BiFunction;)Ljdk/incubator/jpackage/internal/ToolValidator;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield jdk.incubator.jpackage.internal.ToolValidator.toolNotFoundErrorHandler:Ljava/util/function/BiFunction;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/jpackage/internal/ToolValidator;
0 2 1 v Ljava/util/function/BiFunction<Ljava/lang/String;Ljava/io/IOException;Ljdk/incubator/jpackage/internal/ConfigException;>;
Signature: (Ljava/util/function/BiFunction<Ljava/lang/String;Ljava/io/IOException;Ljdk/incubator/jpackage/internal/ConfigException;>;)Ljdk/incubator/jpackage/internal/ToolValidator;
MethodParameters:
Name Flags
v
jdk.incubator.jpackage.internal.ToolValidator setToolOldVersionErrorHandler(java.util.function.BiFunction<java.lang.String, java.lang.String, jdk.incubator.jpackage.internal.ConfigException>);
descriptor: (Ljava/util/function/BiFunction;)Ljdk/incubator/jpackage/internal/ToolValidator;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield jdk.incubator.jpackage.internal.ToolValidator.toolOldVersionErrorHandler:Ljava/util/function/BiFunction;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/jpackage/internal/ToolValidator;
0 2 1 v Ljava/util/function/BiFunction<Ljava/lang/String;Ljava/lang/String;Ljdk/incubator/jpackage/internal/ConfigException;>;
Signature: (Ljava/util/function/BiFunction<Ljava/lang/String;Ljava/lang/String;Ljdk/incubator/jpackage/internal/ConfigException;>;)Ljdk/incubator/jpackage/internal/ToolValidator;
MethodParameters:
Name Flags
v
jdk.incubator.jpackage.internal.ConfigException validate();
descriptor: ()Ljdk/incubator/jpackage/internal/ConfigException;
flags: (0x0000)
Code:
stack=8, locals=6, args_size=1
start local 0 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 1
start local 1 1: aload 1
aload 0
getfield jdk.incubator.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: aload 1
aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.args:Ljava/util/List;
invokeinterface java.util.List.addAll:(Ljava/util/Collection;)Z
pop
3: aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.toolPath:Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.getFileName:()Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
astore 2
start local 2 4: new java.lang.ProcessBuilder
dup
aload 1
invokespecial java.lang.ProcessBuilder.<init>:(Ljava/util/List;)V
astore 3
start local 3 5: new java.util.concurrent.atomic.AtomicBoolean
dup
invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:()V
astore 4
start local 4 6: aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
ifnonnull 8
7: aload 4
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.setPlain:(Z)V
8: StackMap locals: jdk.incubator.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
start local 5 9: aload 3
invokestatic jdk.incubator.jpackage.internal.Executor.of:(Ljava/lang/ProcessBuilder;)Ljdk/incubator/jpackage/internal/Executor;
aload 0
aload 5
aload 4
invokedynamic accept(Ljdk/incubator/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/incubator/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.incubator.jpackage.internal.Executor.setOutputConsumer:(Ljava/util/function/Consumer;)Ljdk/incubator/jpackage/internal/Executor;
10: invokevirtual jdk.incubator.jpackage.internal.Executor.execute:()I
pop
11: aload 4
invokevirtual java.util.concurrent.atomic.AtomicBoolean.getPlain:()Z
ifne 41
12: aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.toolOldVersionErrorHandler:Ljava/util/function/BiFunction;
ifnull 15
13: aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.toolOldVersionErrorHandler:Ljava/util/function/BiFunction;
aload 2
aload 5
iconst_0
aaload
invokeinterface java.util.function.BiFunction.apply:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast jdk.incubator.jpackage.internal.ConfigException
14: areturn
15: StackMap locals: java.lang.String[]
StackMap stack:
new jdk.incubator.jpackage.internal.ConfigException
dup
16: ldc "error.tool-old-version"
17: invokestatic jdk.incubator.jpackage.internal.I18N.getString:(Ljava/lang/String;)Ljava/lang/String;
iconst_2
anewarray java.lang.Object
dup
iconst_0
18: aload 2
aastore
dup
iconst_1
aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
aastore
19: invokestatic java.text.MessageFormat.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
20: ldc "error.tool-old-version.advice"
21: invokestatic jdk.incubator.jpackage.internal.I18N.getString:(Ljava/lang/String;)Ljava/lang/String;
iconst_2
anewarray java.lang.Object
dup
iconst_0
22: aload 2
aastore
dup
iconst_1
23: aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
aastore
24: invokestatic java.text.MessageFormat.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
25: invokespecial jdk.incubator.jpackage.internal.ConfigException.<init>:(Ljava/lang/String;Ljava/lang/String;)V
26: areturn
end local 5 end local 4 end local 3 27: StackMap locals: jdk.incubator.jpackage.internal.ToolValidator java.util.List java.lang.String
StackMap stack: java.io.IOException
astore 3
start local 3 28: aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.toolNotFoundErrorHandler:Ljava/util/function/BiFunction;
ifnull 30
29: aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.toolNotFoundErrorHandler:Ljava/util/function/BiFunction;
aload 2
aload 3
invokeinterface java.util.function.BiFunction.apply:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast jdk.incubator.jpackage.internal.ConfigException
areturn
30: StackMap locals: java.io.IOException
StackMap stack:
new jdk.incubator.jpackage.internal.ConfigException
dup
31: ldc "error.tool-not-found"
32: invokestatic jdk.incubator.jpackage.internal.I18N.getString:(Ljava/lang/String;)Ljava/lang/String;
iconst_2
anewarray java.lang.Object
dup
iconst_0
33: aload 2
aastore
dup
iconst_1
aload 3
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
aastore
34: invokestatic java.text.MessageFormat.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
35: ldc "error.tool-not-found.advice"
36: invokestatic jdk.incubator.jpackage.internal.I18N.getString:(Ljava/lang/String;)Ljava/lang/String;
iconst_1
anewarray java.lang.Object
dup
iconst_0
37: aload 2
aastore
38: invokestatic java.text.MessageFormat.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
39: aload 3
40: invokespecial jdk.incubator.jpackage.internal.ConfigException.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
areturn
end local 3 41: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 42 0 this Ljdk/incubator/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 start local 3 0: aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.versionParser:Ljava/util/function/Function;
ifnull 4
aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
ifnull 4
1: aload 1
iconst_0
aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.versionParser:Ljava/util/function/Function;
aload 3
invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
aastore
2: aload 0
getfield jdk.incubator.jpackage.internal.ToolValidator.minimalVersion:Ljava/lang/Comparable;
aload 1
iconst_0
aaload
invokeinterface java.lang.Comparable.compareTo:(Ljava/lang/Object;)I
ifge 4
3: aload 2
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.setPlain:(Z)V
4: StackMap locals:
StackMap stack:
return
end local 3 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/incubator/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