Javadoc link to method in other class

后端 未结 3 1015
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-29 21:26

Currently I\'m referencing methods in other classes with this Javadoc syntax:

@see {@link com.my.package.Class#method()}

And in what I understa

3条回答
  •  时光取名叫无心
    2021-01-29 21:47

    So the solution to the original problem is that you don't need both the "@see" and the "{@link...}" references on the same line. The "@link" tag is self-sufficient and, as noted, you can put it anywhere in the javadoc block. So you can mix the two approaches:

    /**
     * some javadoc stuff
     * {@link com.my.package.Class#method()}
     * more stuff
     * @see com.my.package.AnotherClass
     */
    

提交回复
热议问题