【问题标题】:Is it possible to create documentation comments on the right instead on top?是否可以在右侧而不是顶部创建文档注释?
【发布时间】:2015-08-02 14:28:09
【问题描述】:

文档有时会降低代码的可读性。

代替

/**
 * The X axis.
 */
int x;

/**
 * The Y axis.
 */
int y;

/**
 * The Z axis.
 */
int z;

我宁愿拥有

int x; /** The X axis */
int y; /** The Y axis */
int z; /** The Z axis */

在 Java 中有没有办法让 cmets 在 e 的右侧。 G。变量声明?我已经通过使用“

【问题讨论】:

标签: java documentation comments


【解决方案1】:

Doc Comments 只工作一次。它们可以在代码中的任何位置并且多次出现,但只有第一个是由 Javadoc 工具提取的。其余的都被简单地忽略了。

【讨论】:

  • 对。答案是不。这是一个约定,对编译器来说更容易
猜你喜欢
  • 1970-01-01
  • 2011-11-24
  • 2023-03-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-11-22
  • 2021-10-12
  • 1970-01-01
相关资源
最近更新 更多