Class ValidateCommand

java.lang.Object
software.amazon.smithy.cli.commands.ValidateCommand
All Implemented Interfaces:
Command

public final class ValidateCommand extends Object
  • Constructor Details

    • ValidateCommand

      public ValidateCommand(String parentCommandName)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Command
      Gets the name of the command.

      The returned name should contain no spaces or special characters.

      Returns:
      Returns the command name.
    • getSummary

      public String getSummary()
      Description copied from interface: Command
      Gets a short summary of the command that's shown in the main help.
      Returns:
      Returns the short help description.
    • createArgumentReceivers

      protected List<ArgumentReceiver> createArgumentReceivers()
      Creates argument receivers for the command.
      Returns:
      Returns the parsed positional arguments.
    • run

      protected int run(Arguments arguments, Command.Env env, List<String> models)
      Run the non-help command after all arguments have been parsed.
      Parameters:
      arguments - Arguments to evaluate.
      env - CLI environment settings.
      models - Parsed positional arguments.
      Returns:
      Returns the exit code.
    • execute

      public final int execute(Arguments arguments, Command.Env env)
      Description copied from interface: Command
      Executes the command using the provided arguments.
      Specified by:
      execute in interface Command
      Parameters:
      arguments - CLI arguments.
      env - CLI environment settings like stdout, stderr, etc.
      Returns:
      Returns the exit code.
    • printHelp

      public void printHelp(Arguments arguments, CliPrinter printer)
      Description copied from interface: Command
      Prints help output.
      Specified by:
      printHelp in interface Command
      Parameters:
      arguments - Arguments that have been parsed so far.
      printer - Where to write help.