On Fri, Oct 2, 2009 at 1:50 PM, Michael Hunger <[email protected]> wrote:
> I had some trouble last night attaching (reusing) several AppliesToFilter
> classes to a sideeffect.
>
> While the annotation doc says they are or'ed, so that if any of those
> matches the Mixin is applied, the code in AbstractModifierDeclaration uses
> an AndAppliesTo composition to add up all the filters. Which naturally fails
> as the different filter classes are mutually exclusive.
>
> AMD: 104 :                     appliesToFilter = new AndAppliesToFilter(
> appliesToFilter, filter );
> also in line 68:                 appliesToFilter = new AndAppliesToFilter(
> appliesToFilter, new ImplementsMethodAppliesToFilter() );
>
> My workaround solution for the tutorial, was to provide a custom filter that
> manually or's a list of filters.
>
> But this wouldn't work with implicitely inherited applies to lists.

Do you have some samples, so usecases can easier be discussed?

I vaguely remember that this was discussed way back in time (Rickard's
apartment in Orebro, 2007), and OR was selected, but the code was
written later, at which point such could have been forgotten or some
other usecase showed AND being more natural.


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

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

Reply via email to