Because of type erasure the only way to know the type of the list would be to pass in the type as a parameter to the method:
public class Main {
public static void main(String[] args) {
doStuff(new LinkedList(), String.class);
}
public static void doStuff(List list, Class clazz) {
}
}