【问题标题】:Putting hypertext link to external internet site inside javadoc [duplicate]将超文本链接放入javadoc中的外部互联网站点[重复]
【发布时间】:2011-11-12 14:18:06
【问题描述】:

我希望我的 javadoc 参考我的 Intranet 上的开发手册。我想知道如何做到这一点:我尝试使用 see {@link http://json.org} 但这只是产生了http://json.org 而不是超文本链接。假设我想指向 javadoc 中的某个 wiki 页面。我怎样才能做到这一点?我只是想链接到外部网站。所以我想要像 Example 这样的超文本链接,它指向网站的完整 URL。

【问题讨论】:

  • 不是重复的。另一个问题没有回答如何将{@link } 与 URL 一起使用。答案,它不会工作,根本没有出现在另一个问题中。

标签: java javadoc


【解决方案1】:

{@link}{@linkplain} 专门用于链接到其他 javadoc。

要链接到普通网页,您可以简单地使用 HTML 链接:

* @see <a href="http://json.org/">The JSON site</a>

【讨论】:

    【解决方案2】:
    /**
    * some text <a href="https://www.example1.com">some in text link</a>
    * @see <a href="https://www.example2.com">some other link</a>
    */
    public void someFunction() {}
    

    将显示为

    public void someFunction()

    一些文字some in text link

    另请参阅:
    some other link

    【讨论】:

      猜你喜欢
      • 2015-05-17
      • 2012-03-03
      • 1970-01-01
      • 2011-11-27
      • 2016-09-20
      • 2010-11-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多