I have a list like that:
private List myList = new ArrayList();
I want to get the .class of T. How can I do that?
You cannot. That information is not available at runtime. If your list isn't empty you might be able to get away with checking the class of the first element.