I want to have mutually exclusive command options for the below snippet :
@Command(description = "test command")
public void test(
@Option(names = { "-a"}, required = true, arity = "0", description = "print A") boolean a,
@Option(names = { "-b"}, required = true, description = "pint B") boolean b)
//
}
If I use @ArgGroup for a class field then It works but I want to achieve the same for methods.
class TestClass{
@ArgGroup(exclusive = true, multiplicity = "1")
private Sample sample = new Sample();
public static class Sample {
@Option(names = { "-a"}, required = true, arity = "0", description = "print A") boolean a ;
@Option(names = { "-b"}, required = true, description = "pint B") boolean b ;
}
}