Package software.amazon.smithy.cli
Interface Command
- All Known Implementing Classes:
AstCommand
,BuildCommand
,DiffCommand
,SelectCommand
,ValidateCommand
public interface Command
Represents a CLI command.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(Arguments arguments, ClassLoader classLoader) Executes the command using the provided arguments.default String
getHelp()
Gets details help for the command.getName()
Gets the name of the command.Gets the parser of the command.Gets a short summary of the command that's shown in the main help.
-
Method Details
-
getName
String getName()Gets the name of the command.The returned name should contain no spaces or special characters.
- Returns:
- Returns the command name.
-
getSummary
String getSummary()Gets a short summary of the command that's shown in the main help.- Returns:
- Returns the short help description.
-
getHelp
Gets details help for the command.Returning an empty string omits detailed help.
- Returns:
- Returns detailed help information.
-
getParser
Parser getParser()Gets the parser of the command.- Returns:
- Returns the argument parser.
-
execute
Executes the command using the provided arguments.- Parameters:
arguments
- CLI arguments.classLoader
- ClassLoader to use in the command.
-