Javadoc link to method in other class

后端 未结 3 1012
爱一瞬间的悲伤
爱一瞬间的悲伤 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:41

    Aside from @see, a more general way of refering to another class and possibly method of that class is {@link somepackage.SomeClass#someMethod(paramTypes)}. This has the benefit of being usable in the middle of a javadoc description.

    From the javadoc documentation (description of the @link tag):

    This tag is very simliar to @see – both require the same references and accept exactly the same syntax for package.class#member and label. The main difference is that {@link} generates an in-line link rather than placing the link in the "See Also" section. Also, the {@link} tag begins and ends with curly braces to separate it from the rest of the in-line text.

提交回复
热议问题