/ltaihyy/article/details/78211274
public class TestParameterizedType extends RequestApiParam<UserDispatchMakeInfoDTO1> {public static void main(String[] args) {Class clazz1=TestParameterizedType.class;/*** 父类的参数类型不能是泛型 泛型的话就会报错*/Type superclassType = TestParameterizedType.class.getGenericSuperclass();Type[] paramList=((ParameterizedType)superclassType).getActualTypeArguments();Class clazz = (Class) paramList[0];System.err.println(clazz);}}