public static interface CommandLine.IExecutionStrategy
CommandLine.execute(String...)method delegates to a configured execution strategy.
Implementers responsibilities are:
ParseResult, select which
CommandSpecshould be executed. This is especially important for commands that have subcommands.
CommandSpec. Often this means invoking a method on the spec's user object.
setExecutionResultto make the return value of that method invocation available to the application
This interface supersedes
int execute(CommandLine.ParseResult parseResult) throws CommandLine.ExecutionException, CommandLine.ParameterException
parseResult- the parse result from which to select one or more
CommandSpecinstances to execute.
CommandLine.ParameterException- if the invoked method on the CommandSpec's user object threw a ParameterException to signify invalid user input.
CommandLine.ExecutionException- if any problem occurred while executing the command. Any exceptions (other than ParameterException) should be wrapped in a ExecutionException and not thrown as is.