On Wed, Mar 4, 2009 at 11:47 AM, Rickard Öberg <[email protected]> wrote:
> Niclas Hedhman wrote:
>> On Wed, Mar 4, 2009 at 12:10 AM, Rickard Öberg <[email protected]> 
>> wrote:
>>
>>> @Uses can only be used with objects and plain Composites. Entities,
>>> Services and Values cannot use @Uses, as the developer does not have
>>> control over the instantiation of these, and for Values it would break
>>> the semantics.
>>
>> I don't think that there is a conflict between @Uses and Values, and
>> if it is not allowed now, it should be.
>
> Can you explain why? Values are immutable, and objects that are @Used
> are not. We also will get a lot of trouble with serialization of
> ValueComposites if you allow them to reference objects with @Uses.

Ok, I think there is a miscommunication going on. I read  "@Uses can
only be used with objects and plain Composites" that I can't reference
a Value with @Uses, where you mean that I can't have @Uses inside my
Value. If so, then I think I agree (the instance passed could be a
value...)


Cheers
Niclas
-- 
http://www.qi4j.org - New Energy for Java

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

Reply via email to