大class

Class clazz;

// 反射
public BaseServiceImpl() {
    Type type = this.getClass().getGenericSuperclass();
    ParameterizedType ptype = (ParameterizedType) type;
    this.clazz = (Class<T>) ptype.getActualTypeArguments()[0];
}
posted @ 2018-01-24 22:03  sidekick-boy  阅读(96)  评论(0)    收藏  举报