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
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
... 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,
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
: 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
-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
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
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
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