jcommander
jcommander copied to clipboard
Command line parsing framework for Java
```xml com.beust jcommander 2.0.0-RC1 ``` - java 8
In my usage, I hope to parse the input args into some sub command. e.g. The input looks like ``` -i iArgs -o oArgs -p pArgs ``` And I have...
MainParameter class is not public so it cannot be used when creating a custom IUsageFormatter class
I tried copying the implementation of the DefaultUsageFormatter to customize it and it gives a compile error because it references the MainParameter class which is not public.
I need to pass a parameter that contains some characters that need to be escaped. For example, `command 'I'm the \"walrus\""`, where the actual parameter value is `I'm the "walrus"`....
Java records come very handy to hold parameter values as a replacement for custom classes, as much less custom code is to be written. Unfortunately JCommander does not allow to...
The formatter uses `Enum::toString` to print. But parse uses `Enum::name` to match. So, you might type `X` but it says it's invalid but also `X` is an allowed value in...
PR #542 (which implements #539) which introduced `IParametersValidator` included its documentation for it, but it is not deployed to the JCommander website. This is the current paragraph for the global...
Suppose that I have this converter which takes a String and attempts conversion into an `Index` - which is basically a wrapper around an `int`: ```java public class IndexConverter implements...
I create a JobPriorityConverter class, it's inherit from EnumConverter. ``` public class JobPriorityConverter extends EnumConverter { public JobPriorityConverter(final String str, final Class clazz) { super(str, clazz); } @Override public JobPriority...
One thing I really like about how ruby handles command line options, is its support for boolean command-line options. When I define an option name like this `--[no-]foo`, the command-line...