Package org.apache.commons.cli
Class HelpFormatter.Builder
- java.lang.Object
-
- org.apache.commons.cli.HelpFormatter.Builder
-
- All Implemented Interfaces:
java.util.function.Supplier<HelpFormatter>
- Enclosing class:
- HelpFormatter
public static final class HelpFormatter.Builder extends java.lang.Object implements java.util.function.Supplier<HelpFormatter>
BuildsHelpFormatter.- Since:
- 1.7.0
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HelpFormatterget()HelpFormatter.BuildersetPrintWriter(java.io.PrintWriter printWriter)Sets the output PrintWriter, defaults to wrappingSystem.out.HelpFormatter.BuildersetShowDeprecated(boolean showDeprecated)Sets whether to show deprecated options.
-
-
-
Constructor Detail
-
Builder
public Builder()
-
-
Method Detail
-
get
public HelpFormatter get()
- Specified by:
getin interfacejava.util.function.Supplier<HelpFormatter>
-
setPrintWriter
public HelpFormatter.Builder setPrintWriter(java.io.PrintWriter printWriter)
Sets the output PrintWriter, defaults to wrappingSystem.out.- Parameters:
printWriter- the output PrintWriter, not null.- Returns:
- this.
-
setShowDeprecated
public HelpFormatter.Builder setShowDeprecated(boolean showDeprecated)
Sets whether to show deprecated options.- Parameters:
showDeprecated- Whether to show deprecated options.- Returns:
- this.
-
-