-
Notifications
You must be signed in to change notification settings - Fork 411
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
Command methods: picking from interfaces in addition to superclasses. #2245
Comments
Hi @vrdhn, my time to work on picocli is extremely limited these days. Mostly just bugfixes. I suggest that you clone the picocli repository, and experiment until it becomes clear which changes are necessary to fulfil your use case. When you are ready, you can raise a pull request to include those changes into the picocli library. A good pull request passes all existing tests (we cannot break any existing applications), and also should add a test for your use case - a test that fails with the current version of picocli and passes with your changes. Of course, make sure that you are happy with your solution, so that it solves your issue completely. Note that this may be quite a lot of work. If you already have a workaround, I am not sure if it is worth your time working on a pull request for also supporting interfaces. |
One more thing: we cannot use default methods on interfaces, since picocli requires only Java 5 (see reasons why), and default methods were introduced in java 8. |
Very specific use case, perhaps:
Right now, the only way is chain of inheritance, and give root
of chain to CommandLine.
Another way is to create default methods in interfaces, and make
top Command implement all these interfaces.
I tried simple change, will this work ?
The text was updated successfully, but these errors were encountered: