io.vertx.ext.shell.command

## Interface Command

-     public interface Command

  A Vert.x Shell command, it can be created from any language using the `CommandBuilder.command(java.lang.String)` or from a Java class using `create(io.vertx.core.Vertx, java.lang.Class<? extends io.vertx.ext.shell.command.AnnotatedCommand>)`
  Author:
    Julien Viet

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default CLI` | `cli()`
    `default void` | `complete(Completion completion)` Perform command completion, when the command is done completing it should call `Completion.complete(List)` or `Completion.complete(String, boolean)` )} method to signal completion is done.
    `static Command` | `create(Vertx vertx, Class<? extends AnnotatedCommand> clazz)` Create a command from a Java class, annotated with Vert.x Core CLI annotations.
    `default Process` | `createProcess()` Create a new process with empty arguments.
    `Process` | `createProcess(List<CliToken> args)` Create a new process with the passed arguments.
    `default String` | `name()`

- - ### Method Detail

    - #### create

          static Command create(Vertx vertx,
                                Class<? extends AnnotatedCommand> clazz)

      Create a command from a Java class, annotated with Vert.x Core CLI annotations.
      Parameters:
        `vertx` - the vertx instance
        `clazz` - the class of the command
      Returns:
        the command object

    - #### name

          default String name()

      Returns:
        the command name

    - #### cli

          default CLI cli()

      Returns:
        the command line interface, can be null

    - #### createProcess

          default Process createProcess()

      Create a new process with empty arguments.
      Returns:
        the process

    - #### createProcess

          Process createProcess(List<CliToken> args)

      Create a new process with the passed arguments.
      Parameters:
        `args` - the process arguments
      Returns:
        the process

    - #### complete

          default void complete(Completion completion)

      Perform command completion, when the command is done completing it should call `Completion.complete(List)` or `Completion.complete(String, boolean)` )} method to signal completion is done.
      Parameters:
        `completion` - the completion object

Copyright © 2024 Eclipse. All rights reserved.