Interface Command

All Known Implementing Classes:
AstCommand, BuildCommand, DiffCommand, SelectCommand, ValidateCommand

public interface Command
Represents a CLI command.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(Arguments arguments, ClassLoader classLoader)
    Executes the command using the provided arguments.
    default String
    Gets details help for the command.
    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

      default 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, ClassLoader classLoader)
      Executes the command using the provided arguments.
      Parameters:
      arguments - CLI arguments.
      classLoader - ClassLoader to use in the command.