Given this code:
List ints = new ArrayList();
// Type mismatch:
// cannot convert from Class t
One way to do this would be to create your own class. I am not sure if this would meet your needs.
I am not really sure what you are trying to achieve. So perhaps wildcards is the answer.
import java.util.*;
class Main
{
public static void main(String[] args)
{
List list = new ArrayList();
Class> clazz = list.getClass();
System.out.println(clazz) ;
}
}