Quoting Rickard Öberg <[email protected]>:

On 2010-01-18 15.11, Stanislav Muhametsin wrote:
Sounds good. I hope the core-team approves this and it will get
implemented soon! :)

For method-constraints, I'm dabbling with a Concern that implements the check Right Now. Reasonably easy to implement, and works well. The only missing point is that I can't ensure that it runs before all other concerns, but for now that's acceptable to me at least.

I remember having similar situation in my project, where I wanted some specific concern to be always last (or first? don't remember). At that time, I would have been content with some way to specify order of concerns right there at interface.

But maybe method-constraints are just the way for specifying which is executed first? And return-value constraints for what is executed last before side-effects?


Regarding your problem - what about having method Boolean isOperationValid(...), which would take Class<? extends Constraint<?, ?>> (or something like that) as parameter, and then instantiate the constraint, run it and return result?


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to