I\'m having trouble using generics. Given the following example :
class A { public A(Class myType){ } } class B extends A<
You can't possibly get a Class> except for Collection.class, because of type erasure. You'll have to use unsafe casts to cast a Collection.class to a Class> -- specifically, (Class>) (Class) Collection.class will do the job.
Class>
Collection.class
(Class>) (Class) Collection.class