获取泛型的实例

 

		Type type = getClass().getGenericSuperclass();
		Type[] paramsTypes = ((ParameterizedType)type).getActualTypeArguments();
		return (Class<T>)paramsTypes[0];

 

 参见:http://blog.csdn.net/ykdsg/article/details/5472591

 

你可能感兴趣的:(泛型,实例)