cbeust / jcommander

Command line parsing framework for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MainParameter class is not public so it cannot be used when creating a custom IUsageFormatter class

JaumeRibas opened this issue · comments

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

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.