Interface Command
-
- All Superinterfaces:
Function
- All Known Implementing Classes:
ActionCommand
,ExitCommand
,HelpCommand
,SecuredCommand
,SubShellCommand
,TopLevelCommand
public interface Command extends Function
ACommand
is a namedFunction
which also provides completion.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Completer
getCompleter(boolean scoped)
Retrieve the completer associated with this command.String
getDescription()
Retrieve the description of this command.String
getName()
Retrieve the name of this command.Parser
getParser()
Retrieve the parser associated with this command or null for the default one.String
getScope()
Retrieve the scope of this command.
-
-
-
Method Detail
-
getScope
String getScope()
Retrieve the scope of this command.- Returns:
- the command scope.
-
getName
String getName()
Retrieve the name of this command.- Returns:
- the command name.
-
getDescription
String getDescription()
Retrieve the description of this command. This short command description will be printed when using thehelp
command.- Returns:
- the command description.
-
getCompleter
Completer getCompleter(boolean scoped)
Retrieve the completer associated with this command.- Parameters:
scoped
- whether the command is invoked from a subshell or not- Returns:
- the
Completer
to use
-
getParser
Parser getParser()
Retrieve the parser associated with this command or null for the default one.- Returns:
- the command parser.
-
-