When it comes to classes without generics, i can access this .class attribute like this:
class Foo{ Class getMyClass(){ return Foo.cla
You can always do this:
class Foo{ Class> getMyClass(){ return (Class>)(Class>)Foo.class } }
You will have unchecked cast warnings, because it indeed is unsafe -- as others have mentioned, the returned class object is not any more "Foo's class" as "Foo's class".
Foo