"dynamic mixins" #1664
three-old-coders
started this conversation in
Ideas
Replies: 2 comments 5 replies
-
Are you aware of this feature? https://picocli.info/#_model_transformations Sounds like that may match your needs. |
Beta Was this translation helpful? Give feedback.
5 replies
-
Given the ArgGroups issue, perhaps a different approach is needed. One idea is to combine the declarative (annotations) API with the dynamic (programmatic) API:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! We use several static classes to group CLI params using mixins. This works well. Now I am looking for a solution to remove mixins dynamically before calling execute.
As an example: Our software runs on different environments and needs different params (some args are windows specific like a path, which is not used on a host and vice versa). To use derived classes will produce many redundant classes. So I am looking for a way to remove mixins on runtime or to intercept the addMixin method. Would be nice to have some kind of predicate callback for each created option to decide if it is used or to be ignored based on a runtime evaluation/criteria (eg Sysem.getProperty("os.name") in our case)
Thanks in advance
Jens
Beta Was this translation helpful? Give feedback.
All reactions