Closed mkarg closed 2 years ago
@cbeust I would kindly request your review please. :-)
ℹ️ In contrast to the original comment, this PR implements #539 using different names than originally proposed. The new interface is called IParametersValidator
(instead of IRule
), and the annotation field is named parametersValidators
(instead of rules
).
This PR proposes a solution to #539 by adding the new interface
IRule
, and the newrules
attribute to@Paramters
. An example demonstrating mutual exclusive parameters is excluded. Also a test is included.In contrast to #539 I dediced that it makes more sense to have rules at the
@Parameters
annotation on the class rather than rules on the single@Parameter
level. The reason is that it would be confusing for the reader if a rule spanning over two parameters is just provided at one parameter annotation. This situation cannot happen if rules can only be given at the class annotation instead of the field annotation.