Package org.jline.shell
Class ArgumentDescription
java.lang.Object
org.jline.shell.ArgumentDescription
Describes a command argument with a name and optional description.
- Since:
- 4.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentDescription(String name) Creates a new argument description with the specified name and an empty description.ArgumentDescription(String name, List<AttributedString> description) Creates a new argument description with the specified name and description. -
Method Summary
Modifier and TypeMethodDescriptionReturns the argument description lines.name()Returns the argument name.static List<ArgumentDescription> Creates a list of argument descriptions from names.
-
Constructor Details
-
ArgumentDescription
Creates a new argument description with the specified name and an empty description.- Parameters:
name- the argument name- Throws:
IllegalArgumentException- if the name contains spaces or tabs
-
ArgumentDescription
Creates a new argument description with the specified name and description.- Parameters:
name- the argument namedescription- the description lines- Throws:
IllegalArgumentException- if the name contains spaces or tabs
-
-
Method Details
-
name
-
description
Returns the argument description lines.- Returns:
- the description, never null
-
of
Creates a list of argument descriptions from names. Each description will have an empty description list.- Parameters:
names- the argument names- Returns:
- a list of argument descriptions
-