@groovy.transform.CompileStatic @groovy.transform.Canonical class CommandDescription extends java.lang.Object
Describes a Command
Modifiers | Name | Description |
---|---|---|
private java.util.Map<java.lang.String, CommandArgument> |
arguments |
|
private jline.console.completer.Completer |
completer |
A completer for the command |
private java.lang.String |
description |
The description of the command |
private java.util.Map<java.lang.String, CommandArgument> |
flags |
|
private java.lang.String |
name |
The name of the command |
private java.util.Collection<java.lang.String> |
synonyms |
Any names that should also map to this command |
private java.lang.String |
usage |
The usage instructions for the command |
Type | Name and description |
---|---|
jline.console.completer.Completer |
completer A completer for the command |
java.lang.String |
description The description of the command |
java.lang.String |
name The name of the command |
java.util.Collection<java.lang.String> |
synonyms Any names that should also map to this command |
java.lang.String |
usage The usage instructions for the command |
Constructor and description |
---|
CommandDescription
() |
Type Params | Return Type | Name and description |
---|---|---|
|
CommandDescription |
argument(java.util.Map args) Adds an argument for the given named arguments |
|
CommandDescription |
completer(java.lang.Class<jline.console.completer.Completer> completer) Sets the completer |
|
CommandDescription |
completer(jline.console.completer.Completer completer) Sets the completer |
|
CommandDescription |
flag(java.util.Map args) Adds a flag for the given named arguments |
|
CommandArgument |
getArgument(java.lang.String name) Returns an argument for the given name or null if it doesn't exist |
|
java.util.Collection<CommandArgument> |
getArguments() Arguments to the command |
|
CommandArgument |
getFlag(java.lang.String name) Returns a flag for the given name or null if it doesn't exist |
|
java.util.Collection<CommandArgument> |
getFlags() Flags to the command. |
|
CommandDescription |
synonyms(java.lang.String[] synonyms) Adds a synonyms for this command |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
A completer for the command
The description of the command
The name of the command
Any names that should also map to this command
The usage instructions for the command
A completer for the command
The description of the command
The name of the command
Any names that should also map to this command
The usage instructions for the command
Adds an argument for the given named arguments
args
- The named argumentsSets the completer
completer
- The class of the completer to setSets the completer
completer
- The completer to setAdds a flag for the given named arguments
args
- The named argumentsReturns an argument for the given name or null if it doesn't exist
name
- The nameArguments to the command
Returns a flag for the given name or null if it doesn't exist
name
- The nameFlags to the command. These differ as they are optional and are prefixed with a hyphen (Example -debug)
Adds a synonyms for this command
synonyms
- The synonymsGroovy Documentation