Instantiating Java objects of generic type parameter

I was going to write a really grand blog entry about how to instantiate a Java object of the type specified as parameter to a generic class but I figured that someone must have done that already. The blog article Java Generics: Instantiating Objects Of Type Parameter Without Passing Class Literal To Instance sums it up pretty good. My implementation supports a deeper inheritance hierarchy (caused my Javassist in my case) but I was not clever enough to extract the hack, I mean magic, to a generic Factory class as suggested by the first comment to the article.

The final statement in the article is that This pattern is frequently used for generic DAO classes, and yes I first saw it at hibernate.org – Generic Data Access Objects, but I think it is a bit scary that this workaround is common enough to be called a pattern.

Nordic Agile in Stockholm on December 1-4

Øresund Agile goes Nordic Agile!

Scrum for team members is a workshop directed to the developers and testers in an agile team,, an obviously very important component in an agile project but maybe not so much the primary target for conferences and the like.

I liked Jim Coplien’s Agile Architecture session on Øresund Agile 2008 very much so I’m pretty sure I can recommend his workshops at Nordic Agile. (Btw, I saw him rushing by at Kastrup Airport the other week!) 

The agile team that I’m part of will most likely be delivering version 1.0 of our current project around those dates, so I won’t be going but I hope you will. Read more on the Nordic Agile web page!

I almost forgot, Clarion Hotel is really nice too! đŸ™‚

On a related note: I like the word the Norweigans use for agile: smidig.