Package de.hsh.graja.util.cli
Class Command
- java.lang.Object
-
- de.hsh.graja.util.cli.Command
-
public class Command extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMMAND_TEMPLATE
-
Constructor Summary
Constructors Constructor Description Command()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(Logging log, String[] args)
Executes the commandList<String>
getDescription()
List<String>
getExample()
String
getName()
Option<?>
getOption(String optionName)
List<Option<?>>
getOptions()
CommandProvider
getProvider()
void
setDescription(List<String> description)
void
setExamplen(List<String> example)
void
setOptions(List<Option<?>> options)
String
toString()
-
-
-
Field Detail
-
COMMAND_TEMPLATE
public static final String COMMAND_TEMPLATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
-
getProvider
public CommandProvider getProvider()
-
execute
public void execute(Logging log, String[] args) throws CommandException
Executes the command- Parameters:
args
- the actual command line arguments as passed to a main method- Throws:
Exception
CommandException
-
-