class="java" name="code">private Class<T> clz; @SuppressWarnings("unchecked") public Class<T> getClz() { if (clz == null) { // 获取泛型的Class对象 clz = ((Class<T>) (((ParameterizedType) (this.getClass() .getGenericSuperclass())).getActualTypeArguments()[0])); } return clz; }
?