public static final class ExplicitProcessParameters.Builder extends Object
ExplicitProcessParameters
instance. The builder initially:
Constructor and Description |
---|
Builder() |
public ExplicitProcessParameters.Builder arg(@NullAllowed String a)
null
is ignored.a
- argumentpublic ExplicitProcessParameters.Builder args(@NullAllowed List<String> args)
null
is ignored as well as null
items in the list.args
- argument listpublic ExplicitProcessParameters.Builder args(@NullAllowed String... args)
null
is ignored as well as null
items in the list.args
- argument listpublic ExplicitProcessParameters.Builder launcherArg(@NullAllowed String a)
null
is ignored.a
- launcher argumentpublic ExplicitProcessParameters.Builder launcherArgs(@NullAllowed List<String> args)
null
is ignored as well as null
items in the list.args
- argument listpublic ExplicitProcessParameters.Builder launcherArgs(@NullAllowed String... args)
null
is ignored as well as null
items in the list.args
- argument listpublic ExplicitProcessParameters.Builder replaceArgs(boolean replace)
ExplicitProcessParameters
are the only
ones passed to the process.replace
- true to replace, false to appendpublic ExplicitProcessParameters.Builder replaceLauncherArgs(boolean replace)
ExplicitProcessParameters
are the only
ones passed to the process.replace
- true to replace, false to appendpublic ExplicitProcessParameters.Builder workingDirectory(File workingDirectory)
workingDirectory
- the working directorypublic ExplicitProcessParameters.Builder environmentVariables(Map<String,String> env)
null
values
are interpreted as removal of the respective variables from the environment.env
- a map of additional environment variablespublic ExplicitProcessParameters.Builder environmentVariable(String name, String value)
name
- name of the environment variablevalue
- value of the environment variable, or null
in which case an existing variable is to be removed.public ExplicitProcessParameters.Builder position(int position)
0
. When used in a collection in
ExplicitProcessParameters.buildExplicitParameters(java.util.Collection)
, instances are sorted
by their position, in ascending order (lowest first).position
- rank of the instructionpublic ExplicitProcessParameters.Builder combine(@NullAllowed ExplicitProcessParameters p)
ExplicitProcessParameters
on top of this Builder's state.
It will merge in the passed instruction as described in ExplicitProcessParameters.buildExplicitParameters(java.util.Collection)
.p
- the instruction to combinepublic ExplicitProcessParameters build()
ExplicitProcessParameters
instruction.ExplicitProcessParameters
instance.