public class BuiltinHelpFormatter extends Object implements HelpFormatter
A help formatter that allows configuration of overall row width and column separator width.
The formatter produces output in two sections: one for the options, and one for non-option arguments.
The options section has two columns: the left column for the options, and the right column for their descriptions. The formatter will allow as much space as possible for the descriptions, by minimizing the option column's width, no greater than slightly less than half the overall desired width.
The non-option arguments section is one column, occupying as much width as it can.
Subclasses are free to override bits of this implementation as they see fit. Inspect the code carefully to understand the flow of control that this implementation guarantees.
|Constructor and Description|
Makes a formatter with a given overall row width and column separator width.
|Modifier and Type||Method and Description|
Produces help text, given a set of option descriptors.
public BuiltinHelpFormatter(int desiredOverallWidth, int desiredColumnSeparatorWidth)
desiredOverallWidth- how many characters wide to make the overall help display
desiredColumnSeparatorWidth- how many characters wide to make the separation between option column and description column
public String format(Map<String,? extends OptionDescriptor> options)
© Copyright 2004-2015 Paul R. Holser, Jr. All rights reserved. Licensed under The MIT License. firstname.lastname@example.org