【发布时间】:2010-02-14 06:47:10
【问题描述】:
我正在为我的 Java 项目使用 Eclipse IDE。
我有一个问题。我的项目中的方法具有 javadoc cmets,如下所示:
/**
* Retruns the string representation of a input stream
* @param in
* @return
* @throws IOException
*/
public static String getStringFromInputStream (InputStream in) throws IOException {
StringBuffer out = new StringBuffer();
byte[] b = new byte[4096];
for (int n; (n = in.read(b)) != -1;) {
out.append(new String(b, 0, n));
}
return out.toString();
}
现在我想知道,如果我在方法的签名中进行更改,是否有任何方法可以自动反映在 javadoc 中。
【问题讨论】:
-
重新命名可能会更好。正如标题所声称的那样,javadoc 没有问题。可能类似于“从 Eclipse 中的 JavaDoc 更改重构”。顺便说一句,我认为如果不编写插件就无法做到这一点。
-
这仍有待回答!!!!。所有答案均指重构选项。但是,如果我添加一个新参数或从方法签名中删除一个参数怎么办。那么,如何更新javadoc?
-
伙计们检查我的答案以获得解决方法!