请问自己写的Java类库文件,怎么才能让Eclipse显示方法的注释?

yyxgs 2018-02-24 06:09:57
这是方法的注释:


String.substring:


SubStr.strInCopyStr:
...全文
1261 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
yyxgs 2018-02-27
  • 打赏
  • 举报
回复
顶--------------
yyxgs 2018-02-26
  • 打赏
  • 举报
回复
求个大神指点我
yyxgs 2018-02-26
  • 打赏
  • 举报
回复
引用 6 楼 fy6313156 的回复:
jar包都是class文件,是没有注释的,除非导入源码!
原来是这样,那为什么String.substring可以看到注释呢?
yannsPeng 2018-02-25
  • 打赏
  • 举报
回复
加上
Returns a string that is a substring of this string. The
     * substring begins with the character at the specified index and
     * extends to the end of this string. 
     * @param str
yannsPeng 2018-02-25
  • 打赏
  • 举报
回复
package com.test;

public class TestUtils
{
    /**
     * Returns a string that is a substring of this string. The
     * substring begins with the character at the specified index and
     * extends to the end of this string. 
     * @param str
     */
    public static void getS(String str) {
        
    }
}
package com.test;

public class MS_1
{
    public static void main(String[] args)
    {
        String str = "asdasd";
        str.substring(0, 1);
        TestUtils.getS(str);
    }
}
你类比一下不就行了。
fy6313156 2018-02-25
  • 打赏
  • 举报
回复
jar包都是class文件,是没有注释的,除非导入源码!
yyxgs 2018-02-25
  • 打赏
  • 举报
回复
引用 3 楼 baidu_27893705 的回复:
加上
Returns a string that is a substring of this string. The
     * substring begins with the character at the specified index and
     * extends to the end of this string. 
     * @param str
没有导出jar文件之前可以显示 导出成类库就不行了。
yyxgs 2018-02-25
  • 打赏
  • 举报
回复
引用 3 楼 baidu_27893705 的回复:
加上
Returns a string that is a substring of this string. The
     * substring begins with the character at the specified index and
     * extends to the end of this string. 
     * @param str
加了,还是不行。 和我自己的方法注释一样,在没导出jar文件的之前会显示, 导出到jar文件之后, 就不显示了。
yyxgs 2018-02-24
  • 打赏
  • 举报
回复
为什么我单击方法名,没有显示我的注释呢?

58,455

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧