Off-topic: Java Reflection/Generics/Collections question

2008-12-26 Thread Frank Staals
Not realy a FreeBSD-specific question but I was not sure where I could find what I was looking for elseware (Googling did not manage to dig up much info): The problem: I want to set the type of objects some Collection object holds on runtime. In other wors I have an object C with: C extends

Re: Off-topic: Java Reflection/Generics/Collections question

2008-12-26 Thread Vladimir Tsvetkov
What you try to do is not a valid operation in type-safe language as Java. You can't convert Coll to CollItemType, but you can cast Coll? to CollWhatever. Don't know if this is OK with the problem you're trying to solve Merry Christmas! On Fri, Dec 26, 2008 at 4:20 PM, Frank Staals

Re: Off-topic: Java Reflection/Generics/Collections question

2008-12-26 Thread Frank Staals
Vladimir Tsvetkov wrote: What you try to do is not a valid operation in type-safe language as Java. You can't convert Coll to CollItemType, but you can cast Coll? to CollWhatever. Don't know if this is OK with the problem you're trying to solve Merry Christmas! On Fri, Dec 26, 2008 at