Niclas Hedhman wrote:
> On Mon, Jan 12, 2009 at 5:17 PM, Niclas Hedhman <[email protected]> wrote:
> 
>> Suggestion;
>> "The generic type of a Property must be a fully Serializable type, and
>> must not have any injected members."
> 
> Actually, it is not the type that needs to be Serializable, but the
> instance that is assigned to it.
> This poses the question; Should we require the type to be Serializable
> and change the Property definitions to
> 
> public interface Property<T extends Serializable>
>     extends PropertyInfo
> 
> or should we require the set() method to do the check and fail if the
> instance is not Serializable,
> 
> or just let things fail 'late'?
> 
> 
> I am in the position of the first, purely because I love compile time support.

Well, I think we had this at some point, but it's annoying if you want 
to use interfaces for the type, e.g. java.util.List. You would have to 
set the type to ArrayList, or any other concrete class, which is bad. 
Also, it makes sense for Properties in Entities to be serializable, but 
not necessarily for Properties in Composites, which could be literally 
anything without any problems.

/Rickard


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

Reply via email to