Niclas Hedhman wrote:
My testcase for QI-219 contains the following test entity;

    interface InputEntity<T> extends EntityComposite
    {
        interface State
        {
            Property<Boolean> enabled();
            Property<Integer> priority();
            Property<Emitter> emitter();
        }
    }

but since State is not referenced anywhere, I get a funky exception

This is quite natural, since there are no references to State at all, so Qi4j has no idea it even exists.

<snip>
The State mixin is correctly found. I assume that this is related to
some "method looping" when the Mixins are handled on start-up.

Yeah. We start with all the methods in the Entity, find mixins for them all, and then look at what needs those mixins have and add them transitively.

My question is; Is this a reasonable limitation, or should the @This
reference be found no matter what? (Needs to be documented as well)

This is how it should be. You may be declaring a whole bunch of mixins that are "potentially used" (e.g. in a base composite, like EntityComposite.class) but not actually used, so it is important that only those who are actually used are included.

/Rickard

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

Reply via email to