public final class CommandLineBuilder extends Object
CommandLine| Constructor and Description |
|---|
CommandLineBuilder() |
| Modifier and Type | Method and Description |
|---|---|
CommandLine |
toCommandLine() |
CommandLineBuilder |
withArgument(String argument) |
CommandLineBuilder |
withArguments(Collection<String> arguments) |
CommandLineBuilder |
withLongFlag(String name)
Add a flag option with its long name
|
CommandLineBuilder |
withLongOption(String name,
String value)
Add an option with its long name
|
CommandLineBuilder |
withShortFlag(String name)
Add a flag option with its short name
|
CommandLineBuilder |
withShortOption(String name,
String value)
Add an option with its short name
|
public CommandLine toCommandLine()
public CommandLineBuilder withArgument(String argument)
argument - Add an argument expressionpublic CommandLineBuilder withArguments(Collection<String> arguments)
arguments - Add a list of argumentspublic CommandLineBuilder withLongFlag(String name)
name - Long name of the flag option to addpublic CommandLineBuilder withLongOption(String name, String value)
name - Long name of the option to addvalue - Value of the option to addpublic CommandLineBuilder withShortFlag(String name)
name - Short name of option to addpublic CommandLineBuilder withShortOption(String name, String value)
name - Short name of the option to addvalue - Value of option to addCopyright © 2008–2018. All rights reserved.