Re: [OT] More Java's generic type parameters are not reified...

2009-09-17 Thread vineet semwal
the first time I used genericsuperclass() was in generic daos after reading https://www.hibernate.org/328.html, though it has it's own quirks, it doesn't apply every where .. abstract modifier in above code was needed,it's done so that one will eventually subclass funnyfactory and that

Re: [OT] More Java's generic type parameters are not reified...

2009-09-17 Thread Igor Vaynberg
what happens if down the line the index of the type changes?: ) class FunnierFactoryA,B extends FunnyFactoryB -igor On Wed, Sep 16, 2009 at 3:43 PM, jWeekend jweekend_for...@cabouge.com wrote: Since you can NOT do class ST{S(){T t = new T();}} // broken how would you create an object of

Re: [OT] More Java's generic type parameters are not reified...

2009-09-17 Thread jWeekend
... or, if you subclass the subclass ... In the form I gave it's very fragile - just a trick really, but it tells you a bit about what is actually in the bytecode and contradicts (as conclusively as using javap) what some would have you believe. Regards - Cemal jWeekend OO Java Technologies,

Re: [OT] More Java's generic type parameters are not reified...

2009-09-17 Thread jWeekend
Vineet , Yes, this is a technique that, carefully and properly used, could help in building a generic DAO. Can you elaborate on intializing the class type in constructor. ? Regards - Cemal jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com vineet semwal

RE: [OT] More Java's generic type parameters are not reified...

2009-09-17 Thread Sluis, M. van der (Minto)
: jWeekend [mailto:jweekend_for...@cabouge.com] Verzonden: donderdag 17 september 2009 0:44 Aan: users@wicket.apache.org Onderwerp: [OT] More Java's generic type parameters are not reified... Since you can NOT do class ST{S(){T t = new T();}} // broken how would you create an object of type T

RE: [OT] More Java's generic type parameters are not reified...

2009-09-17 Thread jWeekend
-Oorspronkelijk bericht- Van: jWeekend [mailto:jweekend_for...@cabouge.com] Verzonden: donderdag 17 september 2009 0:44 Aan: users@wicket.apache.org Onderwerp: [OT] More Java's generic type parameters are not reified... Since you can NOT do class ST{S(){T t = new T();}} // broken how would

Re: [OT] More Java's generic type parameters are not reified...

2009-09-17 Thread vineet semwal
I should have stated it clearly .. i actually meant passing type Class in constructor itself like in following code:- class FunnyT { private ClassTtypeClass; public Funny(ClassTtypeClass){ this.typeClass=typeClass; } } class FunnierT,R extends FunnyT{ private ClassTtypeClassT; private

Re: [OT] More Java's generic type parameters are not reified...

2009-09-17 Thread vineet semwal
and using it in this way Funnier Foo,Barfunnier=new FunnierFoo,Bar(Foo.class,Bar.class); or Funny Foofunny=new FunnyFoo(Foo.class); -- regards, Vineet Semwal On Thu, Sep 17, 2009 at 8:16 PM, vineet semwal vineetsemwal1...@gmail.comwrote: I should have stated it clearly .. i actually meant

[OT] More Java's generic type parameters are not reified...

2009-09-16 Thread jWeekend
Since you can NOT do class ST{S(){T t = new T();}} // broken how would you create an object of type T somewhere in S? Think about this before you read on ... At the risk of reigniting the world-famous generics debates of yesteryear, just as our noble core-developers regroup to start work on