public static class HelpFormatter.Builder extends Object implements Supplier<HelpFormatter>
HelpFormatter.| Constructor | Description |
|---|---|
Builder() |
Constructs a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
HelpFormatter |
get() |
|
HelpFormatter.Builder |
setPrintWriter(PrintWriter printWriter) |
Sets the output PrintWriter, defaults to wrapping
System.out. |
HelpFormatter.Builder |
setShowDeprecated(boolean useDefaultFormat) |
Sets whether to show deprecated options.
|
HelpFormatter.Builder |
setShowDeprecated(Function<Option,String> deprecatedFormatFunction) |
Sets whether to show deprecated options.
|
HelpFormatter.Builder |
setShowSince(boolean showSince) |
Sets whether to show the date the option was first added.
|
public Builder()
public HelpFormatter get()
get in interface Supplier<HelpFormatter>public HelpFormatter.Builder setPrintWriter(PrintWriter printWriter)
System.out.printWriter - the output PrintWriter, not null.this instance.public HelpFormatter.Builder setShowDeprecated(boolean useDefaultFormat)
useDefaultFormat - if true use the default format, otherwise clear the formatter.this instance.public HelpFormatter.Builder setShowDeprecated(Function<Option,String> deprecatedFormatFunction)
deprecatedFormatFunction - Specify the format for the deprecated options.this instance.public HelpFormatter.Builder setShowSince(boolean showSince)
showSince - if @{code true} the date the options was first added will be shown.Copyright © 2002-2025 The Apache Software Foundation. All rights reserved.Apache Commons CLI | Issue management | Source repository