Class CommandLine.Help.DefaultParameterRenderer
java.lang.Object
org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.DefaultParameterRenderer
- All Implemented Interfaces:
CommandLine.Help.IParameterRenderer
- Enclosing class:
- CommandLine.Help
static class CommandLine.Help.DefaultParameterRenderer
extends Object
implements CommandLine.Help.IParameterRenderer
The DefaultParameterRenderer converts
Parameters
to five columns of text to match the
default TextTable column layout. The first row of values looks like this:
- the required option marker (if the parameter's arity is to have at least one value)
- empty string
- empty string
- parameter(s) label as rendered by the
CommandLine.Help.IParamLabelRenderer
- first element of the
CommandLine.Parameters.description()
array
Following this, there will be one row for each of the remaining elements of the CommandLine.Parameters.description()
array, and these rows look like {"", "", "", param.description()[i]}
.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrender
(CommandLine.Parameters params, Field field, CommandLine.Help.IParamLabelRenderer paramLabelRenderer, CommandLine.Help.ColorScheme scheme) Returns a text representation of the specified Parameters and the Field that captures the parameter values.
-
Field Details
-
requiredMarker
-
-
Constructor Details
-
DefaultParameterRenderer
DefaultParameterRenderer()
-
-
Method Details
-
render
public CommandLine.Help.Ansi.Text[][] render(CommandLine.Parameters params, Field field, CommandLine.Help.IParamLabelRenderer paramLabelRenderer, CommandLine.Help.ColorScheme scheme) Description copied from interface:CommandLine.Help.IParameterRenderer
Returns a text representation of the specified Parameters and the Field that captures the parameter values.- Specified by:
render
in interfaceCommandLine.Help.IParameterRenderer
- Parameters:
params
- the command line parameters to show online usage help forfield
- the field that will hold the value for the command line parametersparamLabelRenderer
- responsible for rendering parameter labels to textscheme
- color scheme for applying ansi color styles to positional parameters- Returns:
- a 2-dimensional array of text values: one or more rows, each containing one or more columns
-