public static final class CommandLine.Builder extends Object implements Supplier<CommandLine>
CommandLine instance using descriptive methods.| Constructor | Description |
|---|---|
Builder() |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
CommandLine.Builder |
addArg(String arg) |
Adds left-over unrecognized option/argument.
|
CommandLine.Builder |
addOption(Option option) |
Adds an option to the command line.
|
CommandLine |
build() |
Deprecated.
Use
get(). |
CommandLine |
get() |
Creates a new instance.
|
CommandLine.Builder |
setDeprecatedHandler(Consumer<Option> deprecatedHandler) |
Sets the deprecated option handler.
|
@Deprecated public Builder()
CommandLine.builder().public CommandLine.Builder addArg(String arg)
arg - the unrecognized option/argument.public CommandLine.Builder addOption(Option option)
option - the processed option.@Deprecated public CommandLine build()
get().public CommandLine get()
get in interface Supplier<CommandLine>public CommandLine.Builder setDeprecatedHandler(Consumer<Option> deprecatedHandler)
deprecatedHandler - the deprecated option handler.this instance.Copyright © 2002-2025 The Apache Software Foundation. All rights reserved.Apache Commons CLI | Issue management | Source repository