I have;
List stringList = new ArrayList();
List integerList = new ArrayList();
Is
You can do the same for method parameters as well:
Method method = someClass.getDeclaredMethod("someMethod");
Type[] types = method.getGenericParameterTypes();
//Now assuming that the first parameter to the method is of type List
ParameterizedType pType = (ParameterizedType) types[0];
Class> clazz = (Class>) pType.getActualTypeArguments()[0];
System.out.println(clazz); //prints out java.lang.Integer