Typically, I\'ve seen people use the class literal like this:
Class cls = Foo.class;
But what if the type is generic, e.g. List?
You can manage it with a double cast :
@SuppressWarnings("unchecked") Class> cls = (Class>)(Object)List.class