-
Hi, Is there a way to create a mutual exclusion between a subcommand and an ArgGroup? I'd like to have these two commands: Currently I have tried this class:
I also tried replacing the stopLive() method with a static inner class which implemented Runnable, same result. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, not really. But then: do you really need to? (And for that matter, do you really need to use an ArgGroup?) If you have a parent command with options/parameters and a subcommand, then the user may specify any combination.
Is this really a problem? And, if it is a problem, then you can add validation logic in the |
Beta Was this translation helpful? Give feedback.
No, not really. But then: do you really need to? (And for that matter, do you really need to use an ArgGroup?)
If you have a parent command with options/parameters and a subcommand, then the user may specify any combination.
Is this really a problem?
The application could just choose to ignore input that is not applicable...
And, if it is a problem, then you can add validation logic in the
stopLive()
method and throw aParameterException
like described in the custom validation section of the manual.