当您在 Eclipse 中的方法上方键入 /** 并 Enter 时,它将生成 Javadoc,例如:
/**
* Finds a World using a String, greets the World,
* and then returns a reference to the World.
*
* @param world - the World to find and greet.
* @return the reference to the World.
* @throws ApocalypseException - if the World is not found.
*/
public World helloWorld(String world) throws ApocalypseException {
...
}
但是,有时当我将 Javadoc 添加到方法时,它会随机停止生成:
/**
*
*/
public Universe helloUniverse(String universe) throws BigBangException {
...
}
这不是特定于某个类的。我将在一个类中生成 5 个左右的方法,然后它就停止生成。我认为 Workspace 无法读取我的类文件,所以我删除了它们并重新编译,但这并没有解决问题。我也尝试过重新启动 Eclipse,但也没有用。