Package org.apache.commons.cli
Class HelpFormatter.Builder
java.lang.Object
org.apache.commons.cli.HelpFormatter.Builder
- All Implemented Interfaces:
Supplier<HelpFormatter>
- Enclosing class:
- HelpFormatter
Builds
HelpFormatter.- Since:
- 1.7.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()setPrintWriter(PrintWriter printWriter) Sets the output PrintWriter, defaults to wrappingSystem.out.setShowDeprecated(boolean useDefaultFormat) Sets whether to show deprecated options.setShowDeprecated(Function<Option, String> showDeprecatedFunc) Sets whether to show deprecated options.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
get
- Specified by:
getin interfaceSupplier<HelpFormatter>
-
setPrintWriter
Sets the output PrintWriter, defaults to wrappingSystem.out.- Parameters:
printWriter- the output PrintWriter, not null.- Returns:
- this.
-
setShowDeprecated
Sets whether to show deprecated options.- Parameters:
useDefaultFormat- iftrueuse the default format, otherwise clear the formatter.- Returns:
- this.
-
setShowDeprecated
Sets whether to show deprecated options.- Parameters:
showDeprecatedFunc- Specify the format for the deprecated options.- Returns:
- this.
- Since:
- 1.8.0
-