public D newD(){
D newD;
try {
// 通過反射獲取model的真實類型
ParameterizedType pt = (ParameterizedType) this.getClass().getGenericSuperclass();
Class<D> clazz = (Class<D>) pt.getActualTypeArguments()[0];
// 通過反射創建model的實例
newD = clazz.newInstance();
} catch (Exception e) {
throw new RuntimeException(e);
}
return newD;
}