Package com.aspectran.shell.command
Interface Command.Descriptor
-
- Enclosing interface:
- Command
public static interface Command.Descriptor
An interface that can be used to describe the the functionality of the command implementation. This is a very important concept in a text-driven environment such as a command-line user interface.
-
-
Method Summary
Modifier and Type Method Description java.lang.String
getDescription()
This method should return a descriptive text about the command it is attached to.java.lang.String
getName()
Implementation of this method should return a simple string (with no spaces) that identifies the action mapped to this command.java.lang.String
getNamespace()
The purpose of the namespace is to provide an identifier to group commands without relying on class name or other convoluted approaches to group commands.java.lang.String
getUsage()
Implementation of this method should return helpful hint on how to use the associated command and further description of options that are supported by the command.
-
-
-
Method Detail
-
getNamespace
java.lang.String getNamespace()
The purpose of the namespace is to provide an identifier to group commands without relying on class name or other convoluted approaches to group commands.- Returns:
- the command's namespace
-
getName
java.lang.String getName()
Implementation of this method should return a simple string (with no spaces) that identifies the action mapped to this command.- Returns:
- the name of the action mapped to this command.
-
getDescription
java.lang.String getDescription()
This method should return a descriptive text about the command it is attached to.- Returns:
- a descriptive text about the command
-
getUsage
java.lang.String getUsage()
Implementation of this method should return helpful hint on how to use the associated command and further description of options that are supported by the command.- Returns:
- Usage of command
-
-