Here you can find the source of getGenericParameterClass(Class actualClass, int parameterIndex)
public static Class getGenericParameterClass(Class actualClass, int parameterIndex)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.ParameterizedType; public class Main { public static Class getGenericParameterClass(Class actualClass, int parameterIndex) { return (Class) ((ParameterizedType) actualClass.getGenericSuperclass()) .getActualTypeArguments()[parameterIndex]; }/*from www .java 2s . c o m*/ }