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 java.lang.Object implements CommandLine.Help.IParamLabelRenderer
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringseparatorThe string to use to separate option parameters from their options.
-
Constructor Summary
Constructors Constructor Description DefaultParamLabelRenderer(java.lang.String separator)Constructs a new DefaultParamLabelRenderer with the specified separator string.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandLine.Help.Ansi.TextrenderParameterLabel(java.lang.reflect.Field field, CommandLine.Help.Ansi ansi, java.util.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 java.lang.StringrenderParameterName(java.lang.reflect.Field field)java.lang.Stringseparator()Returns the separator between option name and param label.
-
-
-
Method Detail
-
separator
public java.lang.String 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(java.lang.reflect.Field field, CommandLine.Help.Ansi ansi, java.util.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
private static java.lang.String renderParameterName(java.lang.reflect.Field field)
-
-