Class CommandLine.Help.DefaultParamLabelRenderer
java.lang.Object
org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.DefaultParamLabelRenderer
- All Implemented Interfaces:
CommandLine.Help.IParamLabelRenderer
- Enclosing class:
CommandLine.Help
static class CommandLine.Help.DefaultParamLabelRenderer
extends Object
implements CommandLine.Help.IParamLabelRenderer
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultParamLabelRenderer(String separator) Constructs a new DefaultParamLabelRenderer with the specified separator string. -
Method Summary
Modifier and TypeMethodDescriptionrenderParameterLabel(Field field, CommandLine.Help.Ansi ansi, List<CommandLine.Help.Ansi.IStyle> styles) Returns a text rendering of the Option parameter or positional parameter; returns an empty string""if the option is a boolean and does not take a parameter.private static StringrenderParameterName(Field field) Returns the separator between option name and param label.
-
Field Details
-
separator
The string to use to separate option parameters from their options.
-
-
Constructor Details
-
DefaultParamLabelRenderer
Constructs a new DefaultParamLabelRenderer with the specified separator string.
-
-
Method Details
-
separator
Description copied from interface:CommandLine.Help.IParamLabelRendererReturns the separator between option name and param label.- Specified by:
separatorin interfaceCommandLine.Help.IParamLabelRenderer- Returns:
- the separator between option name and param label
-
renderParameterLabel
public CommandLine.Help.Ansi.Text renderParameterLabel(Field field, CommandLine.Help.Ansi ansi, List<CommandLine.Help.Ansi.IStyle> styles) Description copied from interface:CommandLine.Help.IParamLabelRendererReturns a text rendering of the Option parameter or positional parameter; returns an empty string""if the option is a boolean and does not take a parameter.- Specified by:
renderParameterLabelin interfaceCommandLine.Help.IParamLabelRenderer- Parameters:
field- the annotated field with a parameter labelansi- determines whether ANSI escape codes should be emitted or notstyles- the styles to apply to the parameter label- Returns:
- a text rendering of the Option parameter or positional parameter
-
renderParameterName
-