Niclas Hedhman wrote:
> As the code is right now; If I declare a EntityComposite as a private
> mixin, the runtime will try to "link it up" with mixins declared for
> the Composite it resides in.
> 
> For instance;
> 
> public interface Abc
> {
>     void doSomething();
> }
> 
> @Mixins( AbcMixin.class )
> public interface AbcComposite extends Abc, Composite
> {}
> 
> public class AbcMixin
>     implements Abc
> {
>     @This SomeOtherComposite privateMixin;
> }
> 
> However, if SomeOtherComposite is an EntityComposite, then EntityMixin
> is not available in the AbcComposite, and hence will fail since the
> EntityMixin is built into the EntityMixinsModel.

This doesn't make sense at all to me right now. Why are you trying to 
cast the composite to an interface extending EntityComposite? You are 
fundamentally trying to change the plain Composite (AbcComposite) to 
magically become an EntityComposite?? That should definitely not work!

> Now, we could either do a lookup in the ModuleModel, or parse the
> Entity type again.

Lookup in ModuleModel of.. what? The implementations of all mixin types 
must be declared in the composite itself, either in @Mixins of the 
Composite (such as AbcComposite) or in the interface that is 
@This-referenced (e.g. if you had "@This SomeOther privateMixin" it 
would be ok to declare @Mixins(SomeOtherMixin.class) in SomeOther 
interface).

> A lot depends on the semantics.
> 
> If the private mixin really IS private, then it sounds strange that it
> needs to be declared in the ModuleAssembly, hence a lookup in
> ModuleModel may fail. But we also like the idea that things are
> visible in the assembly, so I am a bit split on the issue, and don't
> know which way to go here...

How do you declare mixin implementations in ModuleAssembly anyway??

I don't get what it is you are trying to do...

/Rickard

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

Reply via email to