{@inheritDoc}不在Eclipse中继承超类javadoc [英] {@inheritDoc} not inheriting superclass javadoc in Eclipse

查看:1160
本文介绍了{@inheritDoc}不在Eclipse中继承超类javadoc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Eclipse中使用{@inheritDoc}时,超类的javadoc注释不会出现在我的类的javadoc中。

When I use {@inheritDoc} in Eclipse, the superclass's javadoc comments are not appearing in my class's javadoc.

我有以下代码: p>

I have the following piece of code:

import javax.swing.table.AbstractTableModel;

public class TestTableModel extends AbstractTableModel {

/**
 * {@inheritDoc}
 */
@Override
public int getRowCount() {
    return 1;
}

@Override
public Object getValueAt(int rowIndex, int columnIndex) {
    return null;
}

@Override
public int getColumnCount() {
    return 0;
}
}

我确保rt.jar库(其中包含javax.swing.table.AbstractTableModel)具有源代码和javadoc位置的设置,当我将鼠标悬停在getRowCount()时,我可以在工具提示中获取AbstractTableModel javadoc。当我从Eclipse生成javadoc时,我确保在引用的归档和项目部分中选择了rt.jar。但是继承文档不起作用。

I make sure that rt.jar library (which contains javax.swing.table.AbstractTableModel) has source code and javadoc locations set, and indeed when I hover over getRowCount() I get the AbstractTableModel javadoc in a tool tip. When I generate the javadoc from Eclipse, I make sure that in the "referenced archives and projects" section that rt.jar is selected. But the inherit doc does not work.

推荐答案

看起来像超类的源(在这种情况下为AbstractTableModel.java)必须在javadoc的源路径。这是在Eclipse中通过为AbstractTableModel创建一个项目,并在javadoc生成期间的选择要生成Javadoc的类型选项中进行选择。

It looks like the superclass's source (in this case AbstractTableModel.java) must be on the sourcepath of javadoc. This is done in Eclipse by creating a project for AbstractTableModel and selecting it in the "Select types for which Javadoc will be generated" selection during javadoc generation.

这篇关于{@inheritDoc}不在Eclipse中继承超类javadoc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆