java 如何在 JavaDoc 中插入创建日期
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29380477/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to insert creation date in JavaDoc
提问by ?s??
What is the best way to insert the date of the creation of a class in JavaDoc? Some examples:
在 JavaDoc 中插入类创建日期的最佳方法是什么?一些例子:
Below the author tag with the string "created on"
在带有字符串“created on”的作者标签下方
/**
* Class description
*
* @author Author Name
* created on 2015/04/01
*/
public class ClassName() {
...
}
Below the author tag with the string "Date:"
在带有字符串“Date:”的作者标签下方
/**
* Class description
*
* @author Author Name
* Date: 2015/04/01
*/
public class ClassName() {
...
}
With a non-existent @date tag
带有不存在的@date 标签
/**
* Class description
*
* @author Author Name
* @date 2015/04/01
*/
public class ClassName() {
...
}
Other...
其他...
And eventually, what is the best date format?
最后,最好的日期格式是什么?
April 1, 2015
2015/04/01
...
采纳答案by Brett Okken
Most IDE's have a mechanism to define templates to use when creating new classes. The current date can usually be inserted as part of the template.
大多数 IDE 具有定义模板以在创建新类时使用的机制。当前日期通常可以作为模板的一部分插入。
For example, hereis the documentation for eclipse and thispage shows the variables which can be used in templates.