How to add reference to a method parameter in javadoc?

后端 未结 4 835
粉色の甜心
粉色の甜心 2020-12-12 11:31

Is there a way to add references to one or more of a method\'s parameters from the method documentation body? Something like:

/**
 * When {@paramref a} is nu         


        
4条回答
  •  悲&欢浪女
    2020-12-12 12:13

    As far as I can tell after reading the docs for javadoc there is no such feature.

    Don't use foo as recommended in other answers; you can use {@code foo}. This is especially good to know when you refer to a generic type such as {@code Iterator} -- sure looks nicer than Iterator<String>, doesn't it!

提交回复
热议问题