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 java.lang.Object implements CommandLine.Help.IParameterRenderer
The DefaultParameterRenderer convertsParametersto 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 Modifier and Type Field Description java.lang.StringrequiredMarker
-
Constructor Summary
Constructors Constructor Description DefaultParameterRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandLine.Help.Ansi.Text[][]render(CommandLine.Parameters params, java.lang.reflect.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.
-
-
-
Method Detail
-
render
public CommandLine.Help.Ansi.Text[][] render(CommandLine.Parameters params, java.lang.reflect.Field field, CommandLine.Help.IParamLabelRenderer paramLabelRenderer, CommandLine.Help.ColorScheme scheme)
Description copied from interface:CommandLine.Help.IParameterRendererReturns a text representation of the specified Parameters and the Field that captures the parameter values.- Specified by:
renderin 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
-
-