【发布时间】:2016-10-01 22:54:44
【问题描述】:
我正忙于让 java Docs 显示在类的实现方面。 我有一个 api 类,其中所有文档都驻留在实现端,没有任何显示。我已经看到它通过 Eclipse 工作,但我们公司的标准是 IntelliJ。 我找不到有关将文档从 api 链接到 implementationaion 的信息,所以我希望我能就如何实现这一目标获得一些帮助
示例 API类
public interface Builder {
/**
* Adds an interaction to the agents latest interaction.
* It is stored inside the cahce
* If the interaction already exists in the list it is moved from its position to the top
* If the interaction does not exist in the list the eldest interaction is removed and the
* new interaction is added to the top
* @param interaction
* @param amountOfAgentPreviouseInteraction
*/
public void updateInteraction(Interaction interaction, int amountOfAgentPreviouseInteraction);
}
这是我实现方面的 java 文档
并且实现确实实现了该 api 类
@Named
public class BuilderImpl implements Builder {
public void updateInteraction(Interaction interaction, int amountOfAgentPreviouseInteraction){
//Some logic here
}
}
我也尝试过@link 和@see。
这似乎是一项非常简单的任务,但我找不到解决方案。
感谢您的宝贵时间
编辑:好的,所以我忘了提到 api 和实现不在同一个项目中。
【问题讨论】:
-
如果您同时生成所有Javadoc,它将自动发生。否则,您将需要使用 Javadoc
-link选项将实现类链接回接口类。
标签: java intellij-idea comments javadoc