On 2010-06-08 12.00, Rickard Öberg wrote:
On 2010-06-07 22.53, Niclas Hedhman wrote:
Does that mean I can make the Mixin impl methods final??
Nope, if you do that currently all hell will break loose, since the code
generator cannot create submethods. I could change though so that final
methods are not overridden.
I've changed now so that final methods are not overriden, since, uhm, I
can't do it anyway, even if I wanted to :-)
So that's one easy way to avoid the overhead of composite proxy calls.
There's another reason you may want to do it, which I just bumped into
myself: if a mixin implements an interface and registers itself
somewhere (e.g. as a listener), then when the callback comes it will try
to find the method in the Composite and route it through there. If you
haven't added the listener interface to the composite this just won't
work, and you'll get an exception. To get around it simply mark the
method as final, and the callback will be straight to the mixin, without
going through the composite.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev