-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add convenience run method that initializes sub commands and type converters #115
Comments
One idea:
The
Example usage:
Run implementation:
Users can provide their own handler implementation. Example in Java 8 syntax:
Here is how the convenience method could be implemented:
|
Pushed a change set to master with many javadoc updates. Still TODO: update user manual and perhaps more unit tests. |
… `run` and `call` convenience methods now automatically print usage help
For commands implementing
Runnable
there currently is aCommandLine::run
static convenience method that takes care of some boilerplate error handling:Unfortunately this static method does not allow us to register subcommands or custom type converters:
CommandLine
instanceRunnable::run
method.The purpose of this ticket is to explore possibilities for providing a similar convenience API to applications that have subcommands and custom type converters.
The text was updated successfully, but these errors were encountered: