public abstract class SubCommand extends Object
Sub-command for a certain CLI operation.
The CloudStore-command-line-interface uses a syntax similar to the svn command and the logic of the
command 'java -jar co.codewizards.cloudstore.client-VERSION.jar SUBCOMMAND -arg1 val1 -arg2 val2 ...'
is thus actually implemented by a class extending this class and registering
for a certain 'SUBCOMMAND'.
Every subclass of this class can declare its arguments using annotations like Option
.
Constructor and Description |
---|
SubCommand() |
Modifier and Type | Method and Description |
---|---|
abstract String |
getSubCommandDescription()
Get the description for this sub-command.
|
String |
getSubCommandName()
Get the name of the sub-command, i.e.
|
boolean |
isVisibleInHelp() |
void |
prepare() |
protected String |
prompt(String fmt,
Object... args) |
protected String |
promptPassword(String fmt,
Object... args) |
abstract void |
run() |
public SubCommand()
public String getSubCommandName()
public abstract String getSubCommandDescription()
protected String promptPassword(String fmt, Object... args)
public boolean isVisibleInHelp()
Copyright © 2013-2014. All Rights Reserved.