单行上的Javadoc多个变量 [英] Javadoc multiple variables on single line

查看:92
本文介绍了单行上的Javadoc多个变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个如下课程......

I have a class like the following...

class A{

/**
 * Blah blah
 */
 Type1 var;

/**
 * What do I do here?
 */
 Type2 var11, var12;

}

我如何javadoc var11和var12如果它们都是在同一条线上?

How can I javadoc var11, and var12 if they are both on the same line?

我很想知道这是否可能,我知道我可以将它们放在一条线上并从那里开始javadoc。

I am curious to see if this is possible, I know I can put them both on an individual line and javadoc from there.

推荐答案

我很好奇所以我试了一下

I was curious so I tried it out

/**
 * data stuff
 */
 int x , y ;

生成的javadoc重复了x和y的相同doc注释。
我想这个行为在两个字段基本相同且有细微差别时会很有用。

The resulting javadoc repeated the same doc comments for both x and y. I imagine this behavior would be useful if two fields were essentially the same with minor differences.

class Circle
{
    ....
    /**
     * center coordinates
     * The x/y coordinate of the center of this circle.
     */
     int x , y ;

这篇关于单行上的Javadoc多个变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆