On 2010-01-18 15.01, Stanislav Muhametsin wrote:
For human reader I meant, in case there is some constraint named so that
it can be thought to be applied to both return value and invocation
handling. In those cases it would be required to manually go and check
the definition of tagging interface. A small labour in my opinion,
someone else might disagree though. :)
However, otherwise your syntax idea makes good sense. Oh, and I don't
think it was specified at which time return-value and method-constraints
are being invoked. Right after concerns, but before mixin implementation?
Return-value: after the last concern has been executed, and before
side-effects are called. If the value is wrong, then the side-effects
will get an IllegalArgumentException rather than the value as result.
Method-constraints: before everything, even parameter constraint checks.
This is to check whether the entity is in a legal state to be called at
all, for the given method. However, for myself the main usage of this
will actually be that client code should be able to ask if a method on
an entity is valid, so that I can change the actual client UI to have
enabled/disabled controls for that method. In other words, typically
invoking a method that is not valid will be a bug, rather than normal
operation.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev