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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
execute(Arguments arguments, java.lang.ClassLoader classLoader)
Executes the command using the provided arguments.default java.lang.String
getHelp()
Gets details help for the command.java.lang.String
getName()
Gets the name of the command.Parser
getParser()
Gets the parser of the command.java.lang.String
getSummary()
Gets a short summary of the command that's shown in the main help.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Gets the name of the command.The returned name should contain no spaces or special characters.
- Returns:
- Returns the command name.
-
getSummary
java.lang.String getSummary()
Gets a short summary of the command that's shown in the main help.- Returns:
- Returns the short help description.
-
getHelp
default java.lang.String 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
void execute(Arguments arguments, java.lang.ClassLoader classLoader)
Executes the command using the provided arguments.- Parameters:
arguments
- CLI arguments.classLoader
- ClassLoader to use in the command.
-
-