问题描述
有没有办法用子类中声明的具体类型替换父类的泛型类型?以下示例显示了我在超类中的 javadoc 示例。
/**
* Returns a list of all existing repository entries of the linked entity type {@link E}.
*
* @return the list of entries
*/
protected ResponseEntity<List<E>> list() {
return ResponseEntity.ok(service.findAll());
}
在具体子类中打开方法“list”的 javadoc 时,我希望有类似以下文本的内容,而不需要自己覆盖子类中的 javadoc:
“返回链接实体类型 MyType 的所有现有存储库条目的列表。”
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)