class jdk.jpackage.internal.ScriptRunner
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: jdk.jpackage.internal.ScriptRunner
super_class: java.lang.Object
{
private java.lang.String scriptNameSuffix;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private java.lang.String resourceCategoryId;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private java.nio.file.Path directory;
descriptor: Ljava/nio/file/Path;
flags: (0x0002) ACC_PRIVATE
private java.util.Map<java.lang.String, java.lang.String> environment;
descriptor: Ljava/util/Map;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.lang.ProcessBuilder
dup
iconst_0
anewarray java.lang.String
invokespecial java.lang.ProcessBuilder.<init>:([Ljava/lang/String;)V
invokevirtual java.lang.ProcessBuilder.environment:()Ljava/util/Map;
putfield jdk.jpackage.internal.ScriptRunner.environment:Ljava/util/Map;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/jpackage/internal/ScriptRunner;
jdk.jpackage.internal.ScriptRunner setResourceCategoryId(java.lang.String);
descriptor: (Ljava/lang/String;)Ljdk/jpackage/internal/ScriptRunner;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield jdk.jpackage.internal.ScriptRunner.resourceCategoryId:Ljava/lang/String;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/jpackage/internal/ScriptRunner;
0 2 1 v Ljava/lang/String;
MethodParameters:
Name Flags
v
jdk.jpackage.internal.ScriptRunner setDirectory(java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;)Ljdk/jpackage/internal/ScriptRunner;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield jdk.jpackage.internal.ScriptRunner.directory:Ljava/nio/file/Path;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/jpackage/internal/ScriptRunner;
0 2 1 v Ljava/nio/file/Path;
MethodParameters:
Name Flags
v
jdk.jpackage.internal.ScriptRunner setScriptNameSuffix(java.lang.String);
descriptor: (Ljava/lang/String;)Ljdk/jpackage/internal/ScriptRunner;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield jdk.jpackage.internal.ScriptRunner.scriptNameSuffix:Ljava/lang/String;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/jpackage/internal/ScriptRunner;
0 2 1 v Ljava/lang/String;
MethodParameters:
Name Flags
v
jdk.jpackage.internal.ScriptRunner addEnvironment(java.util.Map<java.lang.String, java.lang.String>);
descriptor: (Ljava/util/Map;)Ljdk/jpackage/internal/ScriptRunner;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.jpackage.internal.ScriptRunner.environment:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.putAll:(Ljava/util/Map;)V
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/jpackage/internal/ScriptRunner;
0 2 1 v Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
Signature: (Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;)Ljdk/jpackage/internal/ScriptRunner;
MethodParameters:
Name Flags
v
jdk.jpackage.internal.ScriptRunner setEnvironmentVariable(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)Ljdk/jpackage/internal/ScriptRunner;
flags: (0x0000)
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 2
ifnonnull 4
2: aload 0
getfield jdk.jpackage.internal.ScriptRunner.environment:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
pop
3: goto 5
4: StackMap locals:
StackMap stack:
aload 0
getfield jdk.jpackage.internal.ScriptRunner.environment:Ljava/util/Map;
aload 1
aload 2
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
5: StackMap locals:
StackMap stack:
aload 0
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/jpackage/internal/ScriptRunner;
0 6 1 envVarName Ljava/lang/String;
0 6 2 envVarValue Ljava/lang/String;
MethodParameters:
Name Flags
envVarName
envVarValue
public void run(java.util.Map<java.lang.String, ? super java.lang.Object>);
descriptor: (Ljava/util/Map;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=6, args_size=2
start local 0 start local 1 0: ldc "%s-%s%s"
iconst_3
anewarray java.lang.Object
dup
iconst_0
getstatic jdk.jpackage.internal.StandardBundlerParam.APP_NAME:Ljdk/jpackage/internal/StandardBundlerParam;
aload 1
invokevirtual jdk.jpackage.internal.StandardBundlerParam.fetchFrom:(Ljava/util/Map;)Ljava/lang/Object;
aastore
dup
iconst_1
1: aload 0
getfield jdk.jpackage.internal.ScriptRunner.scriptNameSuffix:Ljava/lang/String;
aastore
dup
iconst_2
invokestatic jdk.jpackage.internal.ScriptRunner.scriptSuffix:()Ljava/lang/String;
aastore
2: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
astore 2
start local 2 3: getstatic jdk.jpackage.internal.StandardBundlerParam.CONFIG_ROOT:Ljdk/jpackage/internal/StandardBundlerParam;
aload 1
invokevirtual jdk.jpackage.internal.StandardBundlerParam.fetchFrom:(Ljava/util/Map;)Ljava/lang/Object;
checkcast java.nio.file.Path
4: aload 2
5: invokeinterface java.nio.file.Path.resolve:(Ljava/lang/String;)Ljava/nio/file/Path;
astore 3
start local 3 6: aconst_null
aload 1
invokestatic jdk.jpackage.internal.OverridableResource.createResource:(Ljava/lang/String;Ljava/util/Map;)Ljdk/jpackage/internal/OverridableResource;
7: aload 0
getfield jdk.jpackage.internal.ScriptRunner.resourceCategoryId:Ljava/lang/String;
invokestatic jdk.jpackage.internal.I18N.getString:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual jdk.jpackage.internal.OverridableResource.setCategory:(Ljava/lang/String;)Ljdk/jpackage/internal/OverridableResource;
8: aload 3
invokevirtual jdk.jpackage.internal.OverridableResource.saveToFile:(Ljava/nio/file/Path;)Ljdk/jpackage/internal/OverridableResource$Source;
pop
9: aload 3
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
ifne 11
10: return
11: StackMap locals: java.lang.String java.nio.file.Path
StackMap stack:
new java.lang.ProcessBuilder
dup
iconst_2
anewarray java.lang.String
dup
iconst_0
invokestatic jdk.jpackage.internal.ScriptRunner.shell:()Ljava/lang/String;
aastore
dup
iconst_1
12: aload 3
invokeinterface java.nio.file.Path.toAbsolutePath:()Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
13: aastore
invokespecial java.lang.ProcessBuilder.<init>:([Ljava/lang/String;)V
astore 4
start local 4 14: aload 4
invokevirtual java.lang.ProcessBuilder.environment:()Ljava/util/Map;
astore 5
start local 5 15: aload 5
invokeinterface java.util.Map.clear:()V
16: aload 5
aload 0
getfield jdk.jpackage.internal.ScriptRunner.environment:Ljava/util/Map;
invokeinterface java.util.Map.putAll:(Ljava/util/Map;)V
17: aload 0
getfield jdk.jpackage.internal.ScriptRunner.directory:Ljava/nio/file/Path;
ifnull 19
18: aload 4
aload 0
getfield jdk.jpackage.internal.ScriptRunner.directory:Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
invokevirtual java.lang.ProcessBuilder.directory:(Ljava/io/File;)Ljava/lang/ProcessBuilder;
pop
19: StackMap locals: java.lang.ProcessBuilder java.util.Map
StackMap stack:
aload 4
invokestatic jdk.jpackage.internal.Executor.of:(Ljava/lang/ProcessBuilder;)Ljdk/jpackage/internal/Executor;
invokevirtual jdk.jpackage.internal.Executor.executeExpectSuccess:()Ljdk/jpackage/internal/Executor;
pop
20: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 this Ljdk/jpackage/internal/ScriptRunner;
0 21 1 params Ljava/util/Map<Ljava/lang/String;-Ljava/lang/Object;>;
3 21 2 scriptName Ljava/lang/String;
6 21 3 scriptPath Ljava/nio/file/Path;
14 21 4 pb Ljava/lang/ProcessBuilder;
15 21 5 workEnvironment Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
Exceptions:
throws java.io.IOException
Signature: (Ljava/util/Map<Ljava/lang/String;-Ljava/lang/Object;>;)V
MethodParameters:
Name Flags
params
private static java.lang.String shell();
descriptor: ()Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: invokestatic jdk.jpackage.internal.Platform.isWindows:()Z
ifeq 2
1: ldc "cscript"
areturn
2: StackMap locals:
StackMap stack:
ldc "SHELL"
invokestatic java.lang.System.getenv:(Ljava/lang/String;)Ljava/lang/String;
invokestatic java.util.Optional.ofNullable:(Ljava/lang/Object;)Ljava/util/Optional;
invokedynamic get()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/jpackage/internal/ScriptRunner.lambda$0()Ljava/lang/String; (6)
()Ljava/lang/String;
invokevirtual java.util.Optional.orElseGet:(Ljava/util/function/Supplier;)Ljava/lang/Object;
checkcast java.lang.String
areturn
LocalVariableTable:
Start End Slot Name Signature
private static java.lang.String scriptSuffix();
descriptor: ()Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: invokestatic jdk.jpackage.internal.Platform.isWindows:()Z
ifeq 2
1: ldc ".wsf"
areturn
2: StackMap locals:
StackMap stack:
ldc ".sh"
areturn
LocalVariableTable:
Start End Slot Name Signature
private static java.lang.String lambda$0();
descriptor: ()Ljava/lang/String;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=1, locals=0, args_size=0
0: ldc "sh"
areturn
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "ScriptRunner.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
final Source = jdk.jpackage.internal.OverridableResource$Source of jdk.jpackage.internal.OverridableResource