警告:悬空 Javadoc 注释 [英] Warning: Dangling Javadoc comment
问题描述
自从我更新了我的 Android Studio (2.3.1) 和构建工具 (2.3.1) 后,我收到了警告,
Since I updated my Android Studio (2.3.1) and build tools (2.3.1), I'm getting warning,
警告:悬空 Javadoc 注释
Warning: Dangling Javadoc comment
对于像这样的评论,
/** set name with format, {@Link FORMAT_NAME} **/
setNameText(getFormattedName(FORMAT_NAME));
如您所见,我使用 javadoc 样式的注释进行链接和其他操作.我想知道是否还有其他具有链接功能的评论替代方案.
As you can see, I use javadoc style comment for linking and others. I'm wondering if there are other comment alternatives that have linking feature.
谢谢.
推荐答案
当您调用方法 setNameText
时,您似乎正在使用 Javadoc 注释.Javadoc 注释 将插入上方类声明、方法声明或字段声明.
It looks like you are using a Javadoc comment when you call the method setNameText
. Javadoc comments are to be inserted above a class declaration, a method declaration, or a field declaration.
如果您只是想在调用方法时添加注释,请使用单行注释://get formatted name based on {@link FORMAT_NAME}
.
If you simply want a comment when calling the method, use the one-line comment: // get formatted name based on {@link FORMAT_NAME}
.
这篇关于警告:悬空 Javadoc 注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!