public interface CliInvocationSpec2<PT,ST>
| Modifier and Type | Method and Description |
|---|---|
<ET extends Exception> |
handle(Class<ET> exceptionClass,
Consumer<ET> handler)
Register exception handler.
|
void |
launch(CliEntry2<PT,ST> launcher)
Launch main method.
|
CliInvocationSpec2<PT,ST> |
usage(Supplier<String> usageHelp)
Specify usage.
|
<ET extends Exception> CliInvocationSpec2<PT,ST> handle(Class<ET> exceptionClass, Consumer<ET> handler)
ET - Exception typeexceptionClass - Exception type to handlehandler - Handlervoid launch(CliEntry2<PT,ST> launcher)
launcher - Entry point to launch with the parsed CLI parametersCliInvocationSpec2<PT,ST> usage(Supplier<String> usageHelp)
Required field of the CLI parameters object are:
boolean help - Print command line help and exit. The annotated
Parameter.help() must be true.)help. When it is true prints help and returns a
nullary instance (which methods does nothing) effectively terminating execution.usageHelp - Supplier of usage help. Implementation is excpected to be free of side effects.