Type type = getClass().getGenericSuperclass(); Type[] paramsTypes = ((ParameterizedType)type).getActualTypeArguments(); return (Class<T>)paramsTypes[0];
参见:http://blog.csdn.net/ykdsg/article/details/5472591
Type type = getClass().getGenericSuperclass(); Type[] paramsTypes = ((ParameterizedType)type).getActualTypeArguments(); return (Class<T>)paramsTypes[0];
参见:http://blog.csdn.net/ykdsg/article/details/5472591
0票
开心
0票
板砖
0票
感动
0票
有用
0票
疑问
0票
难过
0票
无聊
0票
震惊
顶
踩