@deprecated use #execute(String...) and #getExecutionResult() instead @since 2.0
(IParseResultHandler handler, PrintStream out, Help.Ansi ansi, IExceptionHandler exceptionHandler, String... args)
| 2611 | * @deprecated use {@link #execute(String...)} and {@link #getExecutionResult()} instead |
| 2612 | * @since 2.0 */ |
| 2613 | @Deprecated public List<Object> parseWithHandlers(IParseResultHandler handler, PrintStream out, Help.Ansi ansi, IExceptionHandler exceptionHandler, String... args) { |
| 2614 | clearExecutionResults(); |
| 2615 | try { |
| 2616 | List<CommandLine> result = parse(args); |
| 2617 | return handler.handleParseResult(result, out, ansi); |
| 2618 | } catch (ParameterException ex) { |
| 2619 | return exceptionHandler.handleException(ex, out, ansi, args); |
| 2620 | } |
| 2621 | } |
| 2622 | /** |
| 2623 | * Tries to {@linkplain #parseArgs(String...) parse} the specified command line arguments, and if successful, delegates |
| 2624 | * the processing of the resulting {@code ParseResult} object to the specified {@linkplain IParseResultHandler2 handler}. |