You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For commands implementing Runnable there currently is a CommandLine::run static convenience method that takes care of some boilerplate error handling:
CommandLine.run(new MyApp(), System.err, args);
Unfortunately this static method does not allow us to register subcommands or custom type converters:
subcommands and type converters need to be registered on a CommandLineinstance
the parsing result is a list of recognized commands. The application logic needs to be given this list to process, which cannot be done via the (parameterless) Runnable::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.