public final class jdk.incubator.jpackage.internal.Executor
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.incubator.jpackage.internal.Executor
super_class: java.lang.Object
{
private java.lang.ProcessBuilder pb;
descriptor: Ljava/lang/ProcessBuilder;
flags: (0x0002) ACC_PRIVATE
private boolean saveOutput;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean waitBeforeOutput;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private java.util.List<java.lang.String> output;
descriptor: Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/List<Ljava/lang/String;>;
private java.util.function.Consumer<java.util.stream.Stream<java.lang.String>> outputConsumer;
descriptor: Ljava/util/function/Consumer;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/function/Consumer<Ljava/util/stream/Stream<Ljava/lang/String;>;>;
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/jpackage/internal/Executor;
jdk.incubator.jpackage.internal.Executor setOutputConsumer(java.util.function.Consumer<java.util.stream.Stream<java.lang.String>>);
descriptor: (Ljava/util/function/Consumer;)Ljdk/incubator/jpackage/internal/Executor;
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.Executor.outputConsumer:Ljava/util/function/Consumer;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/jpackage/internal/Executor;
0 2 1 v Ljava/util/function/Consumer<Ljava/util/stream/Stream<Ljava/lang/String;>;>;
Signature: (Ljava/util/function/Consumer<Ljava/util/stream/Stream<Ljava/lang/String;>;>;)Ljdk/incubator/jpackage/internal/Executor;
MethodParameters:
Name Flags
v
jdk.incubator.jpackage.internal.Executor saveOutput(boolean);
descriptor: (Z)Ljdk/incubator/jpackage/internal/Executor;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield jdk.incubator.jpackage.internal.Executor.saveOutput:Z
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/jpackage/internal/Executor;
0 2 1 v Z
MethodParameters:
Name Flags
v
jdk.incubator.jpackage.internal.Executor setWaitBeforeOutput(boolean);
descriptor: (Z)Ljdk/incubator/jpackage/internal/Executor;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield jdk.incubator.jpackage.internal.Executor.waitBeforeOutput:Z
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/jpackage/internal/Executor;
0 2 1 v Z
MethodParameters:
Name Flags
v
jdk.incubator.jpackage.internal.Executor setProcessBuilder(java.lang.ProcessBuilder);
descriptor: (Ljava/lang/ProcessBuilder;)Ljdk/incubator/jpackage/internal/Executor;
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.Executor.pb:Ljava/lang/ProcessBuilder;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/jpackage/internal/Executor;
0 2 1 v Ljava/lang/ProcessBuilder;
MethodParameters:
Name Flags
v
jdk.incubator.jpackage.internal.Executor setCommandLine(java.lang.String[]);
descriptor: ([Ljava/lang/String;)Ljdk/incubator/jpackage/internal/Executor;
flags: (0x0080) ACC_VARARGS
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
new java.lang.ProcessBuilder
dup
aload 1
invokespecial java.lang.ProcessBuilder.<init>:([Ljava/lang/String;)V
invokevirtual jdk.incubator.jpackage.internal.Executor.setProcessBuilder:(Ljava/lang/ProcessBuilder;)Ljdk/incubator/jpackage/internal/Executor;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/jpackage/internal/Executor;
0 1 1 cmdline [Ljava/lang/String;
MethodParameters:
Name Flags
cmdline
java.util.List<java.lang.String> getOutput();
descriptor: ()Ljava/util/List;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.incubator.jpackage.internal.Executor.output:Ljava/util/List;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/jpackage/internal/Executor;
Signature: ()Ljava/util/List<Ljava/lang/String;>;
jdk.incubator.jpackage.internal.Executor executeExpectSuccess();
descriptor: ()Ljdk/incubator/jpackage/internal/Executor;
flags: (0x0000)
Code:
stack=7, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual jdk.incubator.jpackage.internal.Executor.execute:()I
istore 1
start local 1 1: iload 1
ifeq 7
2: new java.io.IOException
dup
3: ldc "Command %s exited with %d code"
iconst_2
anewarray java.lang.Object
dup
iconst_0
4: aload 0
getfield jdk.incubator.jpackage.internal.Executor.pb:Ljava/lang/ProcessBuilder;
invokestatic jdk.incubator.jpackage.internal.Executor.createLogMessage:(Ljava/lang/ProcessBuilder;)Ljava/lang/String;
aastore
dup
iconst_1
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
5: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
6: invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: int
StackMap stack:
aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/incubator/jpackage/internal/Executor;
1 8 1 ret I
Exceptions:
throws java.io.IOException
int execute();
descriptor: ()I
flags: (0x0000)
Code:
stack=5, locals=9, args_size=1
start local 0 0: aload 0
aconst_null
putfield jdk.incubator.jpackage.internal.Executor.output:Ljava/util/List;
1: aload 0
getfield jdk.incubator.jpackage.internal.Executor.outputConsumer:Ljava/util/function/Consumer;
ifnonnull 2
invokestatic jdk.incubator.jpackage.internal.Log.isVerbose:()Z
ifne 2
aload 0
getfield jdk.incubator.jpackage.internal.Executor.saveOutput:Z
ifne 2
iconst_0
goto 3
StackMap locals:
StackMap stack:
2: iconst_1
StackMap locals:
StackMap stack: int
3: istore 1
start local 1 4: iload 1
ifeq 7
5: aload 0
getfield jdk.incubator.jpackage.internal.Executor.pb:Ljava/lang/ProcessBuilder;
iconst_1
invokevirtual java.lang.ProcessBuilder.redirectErrorStream:(Z)Ljava/lang/ProcessBuilder;
pop
6: goto 9
7: StackMap locals: int
StackMap stack:
aload 0
getfield jdk.incubator.jpackage.internal.Executor.pb:Ljava/lang/ProcessBuilder;
getstatic java.lang.ProcessBuilder$Redirect.DISCARD:Ljava/lang/ProcessBuilder$Redirect;
invokevirtual java.lang.ProcessBuilder.redirectError:(Ljava/lang/ProcessBuilder$Redirect;)Ljava/lang/ProcessBuilder;
pop
8: aload 0
getfield jdk.incubator.jpackage.internal.Executor.pb:Ljava/lang/ProcessBuilder;
getstatic java.lang.ProcessBuilder$Redirect.DISCARD:Ljava/lang/ProcessBuilder$Redirect;
invokevirtual java.lang.ProcessBuilder.redirectOutput:(Ljava/lang/ProcessBuilder$Redirect;)Ljava/lang/ProcessBuilder;
pop
9: StackMap locals:
StackMap stack:
ldc "Running %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield jdk.incubator.jpackage.internal.Executor.pb:Ljava/lang/ProcessBuilder;
invokestatic jdk.incubator.jpackage.internal.Executor.createLogMessage:(Ljava/lang/ProcessBuilder;)Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokestatic jdk.incubator.jpackage.internal.Log.verbose:(Ljava/lang/String;)V
10: aload 0
getfield jdk.incubator.jpackage.internal.Executor.pb:Ljava/lang/ProcessBuilder;
invokevirtual java.lang.ProcessBuilder.start:()Ljava/lang/Process;
astore 2
start local 2 11: iconst_0
istore 3
start local 3 12: aload 0
getfield jdk.incubator.jpackage.internal.Executor.waitBeforeOutput:Z
ifeq 18
13: aload 2
invokevirtual java.lang.Process.waitFor:()I
istore 3
14: goto 18
StackMap locals: jdk.incubator.jpackage.internal.Executor int java.lang.Process int
StackMap stack: java.lang.InterruptedException
15: astore 4
start local 4 16: aload 4
invokestatic jdk.incubator.jpackage.internal.Log.verbose:(Ljava/lang/Throwable;)V
17: new java.lang.RuntimeException
dup
aload 4
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 4 18: StackMap locals:
StackMap stack:
iload 1
ifeq 43
19: aconst_null
astore 4
aconst_null
astore 5
20: new java.io.BufferedReader
dup
new java.io.InputStreamReader
dup
21: aload 2
invokevirtual java.lang.Process.getInputStream:()Ljava/io/InputStream;
invokespecial java.io.InputStreamReader.<init>:(Ljava/io/InputStream;)V
22: invokespecial java.io.BufferedReader.<init>:(Ljava/io/Reader;)V
astore 6
start local 6 23: aload 0
getfield jdk.incubator.jpackage.internal.Executor.outputConsumer:Ljava/util/function/Consumer;
ifnull 24
invokestatic jdk.incubator.jpackage.internal.Log.isVerbose:()Z
ifne 25
StackMap locals: java.lang.Throwable java.lang.Throwable java.io.BufferedReader
StackMap stack:
24: aload 0
getfield jdk.incubator.jpackage.internal.Executor.saveOutput:Z
ifeq 29
25: StackMap locals:
StackMap stack:
aload 6
invokevirtual java.io.BufferedReader.lines:()Ljava/util/stream/Stream;
invokestatic java.util.stream.Collectors.toList:()Ljava/util/stream/Collector;
invokeinterface java.util.stream.Stream.collect:(Ljava/util/stream/Collector;)Ljava/lang/Object;
checkcast java.util.List
astore 7
start local 7 26: aload 0
getfield jdk.incubator.jpackage.internal.Executor.saveOutput:Z
ifeq 30
27: aload 0
aload 7
putfield jdk.incubator.jpackage.internal.Executor.output:Ljava/util/List;
28: goto 30
end local 7 29: StackMap locals:
StackMap stack:
aconst_null
astore 7
start local 7 30: StackMap locals: java.util.List
StackMap stack:
aload 7
aload 6
invokedynamic get(Ljava/util/List;Ljava/io/BufferedReader;)Ljava/util/function/Supplier;
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;
jdk/incubator/jpackage/internal/Executor.lambda$0(Ljava/util/List;Ljava/io/BufferedReader;)Ljava/util/stream/Stream; (6)
()Ljava/util/stream/Stream;
astore 8
start local 8 31: invokestatic jdk.incubator.jpackage.internal.Log.isVerbose:()Z
ifeq 33
32: aload 8
invokeinterface java.util.function.Supplier.get:()Ljava/lang/Object;
checkcast java.util.stream.Stream
invokedynamic accept()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/Log.verbose(Ljava/lang/String;)V (6)
(Ljava/lang/String;)V
invokeinterface java.util.stream.Stream.forEach:(Ljava/util/function/Consumer;)V
33: StackMap locals: java.util.function.Supplier
StackMap stack:
aload 0
getfield jdk.incubator.jpackage.internal.Executor.outputConsumer:Ljava/util/function/Consumer;
ifnull 35
34: aload 0
getfield jdk.incubator.jpackage.internal.Executor.outputConsumer:Ljava/util/function/Consumer;
aload 8
invokeinterface java.util.function.Supplier.get:()Ljava/lang/Object;
checkcast java.util.stream.Stream
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
35: StackMap locals:
StackMap stack:
aload 7
ifnonnull 37
36: aload 6
invokevirtual java.io.BufferedReader.lines:()Ljava/util/stream/Stream;
invokedynamic accept()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/Executor.lambda$2(Ljava/lang/String;)V (6)
(Ljava/lang/String;)V
invokeinterface java.util.stream.Stream.forEach:(Ljava/util/function/Consumer;)V
end local 8 end local 7 37: StackMap locals:
StackMap stack:
aload 6
ifnull 43
aload 6
invokevirtual java.io.BufferedReader.close:()V
goto 43
StackMap locals:
StackMap stack: java.lang.Throwable
38: astore 4
aload 6
ifnull 39
aload 6
invokevirtual java.io.BufferedReader.close:()V
end local 6 StackMap locals:
StackMap stack:
39: aload 4
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
40: astore 5
aload 4
ifnonnull 41
aload 5
astore 4
goto 42
StackMap locals:
StackMap stack:
41: aload 4
aload 5
if_acmpeq 42
aload 4
aload 5
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
42: aload 4
athrow
43: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.jpackage.internal.Executor.waitBeforeOutput:Z
ifne 45
44: aload 2
invokevirtual java.lang.Process.waitFor:()I
istore 3
45: StackMap locals:
StackMap stack:
iload 3
46: ireturn
47: StackMap locals:
StackMap stack: java.lang.InterruptedException
astore 4
start local 4 48: aload 4
invokestatic jdk.incubator.jpackage.internal.Log.verbose:(Ljava/lang/Throwable;)V
49: new java.lang.RuntimeException
dup
aload 4
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 50 0 this Ljdk/incubator/jpackage/internal/Executor;
4 50 1 needProcessOutput Z
11 50 2 p Ljava/lang/Process;
12 50 3 code I
16 18 4 ex Ljava/lang/InterruptedException;
23 39 6 br Ljava/io/BufferedReader;
26 29 7 savedOutput Ljava/util/List<Ljava/lang/String;>;
30 37 7 savedOutput Ljava/util/List<Ljava/lang/String;>;
31 37 8 outputStream Ljava/util/function/Supplier<Ljava/util/stream/Stream<Ljava/lang/String;>;>;
48 50 4 ex Ljava/lang/InterruptedException;
Exception table:
from to target type
13 14 15 Class java.lang.InterruptedException
23 37 38 any
20 40 40 any
43 46 47 Class java.lang.InterruptedException
Exceptions:
throws java.io.IOException
static jdk.incubator.jpackage.internal.Executor of(java.lang.String[]);
descriptor: ([Ljava/lang/String;)Ljdk/incubator/jpackage/internal/Executor;
flags: (0x0088) ACC_STATIC, ACC_VARARGS
Code:
stack=2, locals=1, args_size=1
start local 0 0: new jdk.incubator.jpackage.internal.Executor
dup
invokespecial jdk.incubator.jpackage.internal.Executor.<init>:()V
aload 0
invokevirtual jdk.incubator.jpackage.internal.Executor.setCommandLine:([Ljava/lang/String;)Ljdk/incubator/jpackage/internal/Executor;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 cmdline [Ljava/lang/String;
MethodParameters:
Name Flags
cmdline
static jdk.incubator.jpackage.internal.Executor of(java.lang.ProcessBuilder);
descriptor: (Ljava/lang/ProcessBuilder;)Ljdk/incubator/jpackage/internal/Executor;
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: new jdk.incubator.jpackage.internal.Executor
dup
invokespecial jdk.incubator.jpackage.internal.Executor.<init>:()V
aload 0
invokevirtual jdk.incubator.jpackage.internal.Executor.setProcessBuilder:(Ljava/lang/ProcessBuilder;)Ljdk/incubator/jpackage/internal/Executor;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 pb Ljava/lang/ProcessBuilder;
MethodParameters:
Name Flags
pb
private static java.lang.String createLogMessage(java.lang.ProcessBuilder);
descriptor: (Ljava/lang/ProcessBuilder;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=2, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 1
start local 1 1: aload 1
ldc "%s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
invokevirtual java.lang.ProcessBuilder.command:()Ljava/util/List;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
2: aload 0
invokevirtual java.lang.ProcessBuilder.directory:()Ljava/io/File;
ifnull 4
3: aload 1
ldc "in %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
invokevirtual java.lang.ProcessBuilder.directory:()Ljava/io/File;
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
4: StackMap locals: java.lang.StringBuilder
StackMap stack:
aload 1
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 pb Ljava/lang/ProcessBuilder;
1 5 1 sb Ljava/lang/StringBuilder;
MethodParameters:
Name Flags
pb
private static java.util.stream.Stream lambda$0(java.util.List, java.io.BufferedReader);
descriptor: (Ljava/util/List;Ljava/io/BufferedReader;)Ljava/util/stream/Stream;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=1, locals=2, args_size=2
0: aload 0
ifnull 2
1: aload 0
invokeinterface java.util.List.stream:()Ljava/util/stream/Stream;
areturn
2: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.io.BufferedReader.lines:()Ljava/util/stream/Stream;
areturn
LocalVariableTable:
Start End Slot Name Signature
private static void lambda$2(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 x Ljava/lang/String;
}
SourceFile: "Executor.java"
InnerClasses:
public abstract Redirect = java.lang.ProcessBuilder$Redirect of java.lang.ProcessBuilder
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles