jcommander
jcommander copied to clipboard
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.
@JaumeRibas I assume you mean https://github.com/cbeust/jcommander/blob/2d3fc624514fd7ca9e99dd5b2b06ab274495ebb6/src/main/java/com/beust/jcommander/JCommander.java#L67
Could you please provide a PR that makes the class public and that proofs the usefulness of doing so? Thanks.
Edit: Maybe it might be a better idea to let MainParameter implement an interface that allows to access main parameter's elements insted of making the class itself public?
Whichever you think is best, as long as people can replicate and tweak the functionality in the DefaultUsageFormatter class. Thanks
I think we should go with the interface. Will you provide a PR?
Sure, I'll try. It's time I learn.