Package org.jline.console
Class ArgDesc
java.lang.Object
org.jline.console.ArgDesc
Represents a command argument description used for generating command help and documentation.
This class stores the name of an argument and its description as a list of attributed strings,
which can include formatting and styling.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoArgNames(List<String> names) Creates a list of argument descriptions from a list of argument names.List<org.jline.utils.AttributedString> Returns the description of the argument as a list of attributed strings.getName()Returns the name of the argument.
-
Constructor Details
-
ArgDesc
Creates a new argument description with the specified name and an empty description.- Parameters:
name- the name of the argument- Throws:
IllegalArgumentException- if the name contains spaces or tabs
-
ArgDesc
Creates a new argument description with the specified name and description.- Parameters:
name- the name of the argumentdescription- the description of the argument as a list of attributed strings- Throws:
IllegalArgumentException- if the name contains spaces or tabs
-
-
Method Details
-
getName
-
getDescription
Returns the description of the argument as a list of attributed strings.- Returns:
- the argument description
-
doArgNames
-