Class CommandBuilder
java.lang.Object
com.thebuzzmedia.exiftool.process.command.CommandBuilder
Command builder.
This builder should be used to create immutable instance of
Command
.-
Method Summary
Modifier and TypeMethodDescriptionAdd all arguments to the command line.addArgument
(String arg, String... args) Add new argument to the command line.build()
Build the command line.static CommandBuilder
Get new builder.static CommandBuilder
Get new builder.
-
Method Details
-
builder
Get new builder.
Note: Usebuilder(String, int)
to optimize the creation of the argument list.- Parameters:
executable
- Executable value.- Returns:
- The new builder.
- Throws:
NullPointerException
- If executable is null.IllegalArgumentException
- If executable is empty or blank.
-
builder
Get new builder.- Parameters:
executable
- Executable value.nbArgs
- The expected number of arguments.- Returns:
- The new builder.
- Throws:
NullPointerException
- If executable is null.IllegalArgumentException
- If executable is empty or blank.
-
addArgument
Add new argument to the command line.- Parameters:
arg
- First argument.args
- Next optional arguments.- Returns:
- The builder.
- Throws:
NullPointerException
- If one of the arguments isnull
.IllegalArgumentException
- If one of the arguments is empty or blank.
-
addAll
Add all arguments to the command line.- Parameters:
arguments
- All arguments.- Returns:
- The builder.
- Throws:
NullPointerException
- If arguments isnull
.IllegalArgumentException
- If arguments is empty.
-
build
Build the command line.- Returns:
- Command Line instance.
-