org.appng.cli

## Class CliCommands

- java.lang.Object
- - org.appng.cli.CliCommands

-     public class CliCommands
      extends Object

  A container class for registering/retrieving `ExecutableCliCommand`s by name.
  Author:
    Matthias Herlitzius

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CliCommands(com.beust.jcommander.JCommander jc)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(String cliName, ExecutableCliCommand command)` Registers the given `ExecutableCliCommand` under the given name.
    `ExecutableCliCommand` | `getCommand(String parsedCommand)` Retrieves the `ExecutableCliCommand` registered under the given name.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CliCommands

          public CliCommands(com.beust.jcommander.JCommander jc)

  - ### Method Detail

    - #### add

          public void add(String cliName,
                          ExecutableCliCommand command)

      Registers the given `ExecutableCliCommand` under the given name.
      Parameters:
        `cliName` - the name used for registering
        `command` - the `ExecutableCliCommand` to register

    - #### getCommand

          public ExecutableCliCommand getCommand(String parsedCommand)
                                          throws com.beust.jcommander.ParameterException

      Retrieves the `ExecutableCliCommand` registered under the given name.
      Parameters:
        `parsedCommand` - the name of the registered `ExecutableCliCommand`
      Returns:
        the non-`null` `ExecutableCliCommand`
      Throws:
        `com.beust.jcommander.ParameterException` - if no `ExecutableCliCommand` was registered under the given name

Copyright © 2011–2023 aiticon GmbH. All rights reserved.