Package org.appng.cli
Class CliCommands
- java.lang.Object
-
- org.appng.cli.CliCommands
-
public class CliCommands extends Object
A container class for registering/retrievingExecutableCliCommand
s by name.- Author:
- Matthias Herlitzius
-
-
Constructor Summary
Constructors Constructor Description CliCommands(com.beust.jcommander.JCommander jc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String cliName, ExecutableCliCommand command)
Registers the givenExecutableCliCommand
under the given name.ExecutableCliCommand
getCommand(String parsedCommand)
Retrieves theExecutableCliCommand
registered under the given name.
-
-
-
Method Detail
-
add
public void add(String cliName, ExecutableCliCommand command)
Registers the givenExecutableCliCommand
under the given name.- Parameters:
cliName
- the name used for registeringcommand
- theExecutableCliCommand
to register
-
getCommand
public ExecutableCliCommand getCommand(String parsedCommand) throws com.beust.jcommander.ParameterException
Retrieves theExecutableCliCommand
registered under the given name.- Parameters:
parsedCommand
- the name of the registeredExecutableCliCommand
- Returns:
- the non-
null
ExecutableCliCommand
- Throws:
com.beust.jcommander.ParameterException
- if noExecutableCliCommand
was registered under the given name
-
-