public DaoBaseImpl () {
Type type = this.getClass().getGenericSuperclass();
ParameterizedType pt = (ParameterizedType) type;
this.clazz = (Class<T>) pt.getActualTypeArguments()[0];
}
public DaoBaseImpl () {
Type type = this.getClass().getGenericSuperclass();
ParameterizedType pt = (ParameterizedType) type;
this.clazz = (Class<T>) pt.getActualTypeArguments()[0];
}
转载于:https://www.cnblogs.com/sallet/p/3926400.html