|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.naturalcli.NaturalCLI
public class NaturalCLI
A set of commands understood by the CLI
Constructor Summary | |
---|---|
NaturalCLI(java.util.Set<Command> commands)
Creates a new instance with the default parameter validator. |
|
NaturalCLI(java.util.Set<Command> commands,
ParameterValidator pv)
Creates a new instance. |
Method Summary | |
---|---|
void |
execute(java.lang.String args)
Runs a command based on the arguments in the string. |
void |
execute(java.lang.String[] args)
Runs a command based on the arguments. |
void |
execute(java.lang.String[] args,
int first)
Runs a command based on the arguments. |
void |
execute(java.lang.String args,
int first)
Runs a command based on the arguments. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NaturalCLI(java.util.Set<Command> commands, ParameterValidator pv)
commands
- the set of commands that can be executed.pv
- the parameter validator.public NaturalCLI(java.util.Set<Command> commands)
commands
- the set of commands that can be executed.Method Detail |
---|
public void execute(java.lang.String[] args, int first) throws ExecutionException
args
- the arguments to be parsedfirst
- the index on args
of the first string for the arguments.
ExecutionException
public void execute(java.lang.String args, int first) throws ExecutionException
args
- the string arguments to run.first
- the index on args
of the first string for the arguments.
ExecutionException
UnknownParameterType
public void execute(java.lang.String[] args) throws ExecutionException
args
- the arguments to be parsed
ExecutionException
public void execute(java.lang.String args) throws ExecutionException
args
- the string with the arguments to be parsed
ExecutionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |