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 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 TypeMethodDescriptionThis method should return a descriptive text about the command it is attached to.getName()
Implementation of this method should return a simple string (with no spaces) that identifies the action mapped to this command.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.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 Details
-
getNamespace
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
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
String getDescription()This method should return a descriptive text about the command it is attached to.- Returns:
- a descriptive text about the command
-
getUsage
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
-