Pau*_*zie 176 java annotations javadoc coding-style code-documentation
我知道这不是最重要的问题,但我只是意识到我可以在注释之前或之后放置javadoc注释块.我们希望采用什么作为编码标准?
/**
* This is a javadoc comment before the annotation
*/
@Component
public class MyClass {
@Autowired
/**
* This is a javadoc comment after the annotation
*/
private MyOtherClass other;
}
Run Code Online (Sandbox Code Playgroud)
Pet*_*ric 186
在注释之前,因为注释是"属于"类的代码.请参阅官方文档中的javadoc示例.
这是我在另一个官方Java页面中找到的随机示例:
/**
* Delete multiple items from the list.
*
* @deprecated Not for public use.
* This method is expected to be retained only as a package
* private method. Replaced by
* {@link #remove(int)} and {@link #removeAll()}
*/
@Deprecated public synchronized void delItems(int start, int end) {
...
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24145 次 |
| 最近记录: |