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

2009-09-17 Thread vineet semwal
and using it in this way Funnier funnier=new Funnier(Foo.class,Bar.class); or Funny funny=new Funny(Foo.class); -- regards, Vineet Semwal On Thu, Sep 17, 2009 at 8:16 PM, vineet semwal wrote: > I should have stated it clearly .. > i actually meant passing type Class in constructor itself like

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 Funny { private ClasstypeClass; public Funny(ClasstypeClass){ this.typeClass=typeClass; } } class Funnier extends Funny{ private ClasstypeClassT; private ClasstypeClassR;

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

2009-09-17 Thread jWeekend
2, 47), instance); > } > } > > Looks pretty powerful to me ;-) > > Regards > > misl > > -Oorspronkelijk bericht- > Van: jWeekend [mailto:jweekend_for...@cabouge.com] > Verzonden: donderdag 17 september 2009 0:44 > Aan: users@wicket.apache.org

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

2009-09-17 Thread Sluis, M. van der (Minto)
[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 S{S(){T t = new T();}} // broken how would you create an object of type

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 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, W

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 FunnierFactory extends FunnyFactory -igor On Wed, Sep 16, 2009 at 3:43 PM, jWeekend wrote: > Since you can NOT do > > class S{S(){T t = new T();}} // broken > > how would you create an object of type T somewhere in S? Think a

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 gener

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

2009-09-16 Thread jWeekend
Since you can NOT do class S{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 mak