In a regular method I can get parameter class like this:
public void methodA(String param)
{
Class typeA = String.class;
// or
Class typeB = param.getClass();
}
In a generic method this still works:
public <T> void methodB(T param)
{
Class type = param.getClass();
}
But what about this:
public <T> void methodC(ArrayList<T> param)
{
//Class type = ???
//How to get T class?
//Something like "Class type = T" would be nice
}