polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <p...@nosphere.org>
Subject Re: Predicates as Constraints
Date Mon, 07 Sep 2015 09:22:19 GMT
Niclas Hedhman a écrit :
> The value in the annotation is solved by field/constructor injection and is
> not an issue (I think).
It should do it.
It should also be noted that such a Predicate then cannot be written as
a lambda.

I now disgress but I'd like to add annotation support for logic
combination of constraints. Something like:

void someMethod( @Or({ @Range(1,4), @Min( 8 ) }) Integer something );

Providing @Or, @And should not be too much work.
What do you guys think about this?


View raw message