如何从 jaxb 文件生成 javaDoc
我正在与 Jaxb 合作。我想从这些类生成 javaDoc 文件,这与我对常规 java 文件执行的方式相同吗?
i am working with Jaxb. and i would like to generate javaDoc files from these classes, is it the same way as i would do it to a regular java files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以将
xs:annotation
与xs:documentation
一起使用,jaxb 会选取它们并使它们成为类上的 javadoc。注意:
在 xs:complexType 标记之外,它
没有接听(可以理解)
.xsd 中的属性/元素级别
对于班级的领域,但没有尝试。
在文档中。有
可能有办法解决这个问题,但我
也没有尝试过。
You can use the
xs:annotation
withxs:documentation
and jaxb picks them up and makes them javadoc on the class.Notes:
outside the xs:complexType tag, it
didn't pick up (understandably)
attribute / element level in the .xsd
for fields of the class, but didn't try.
in the documentation. There's
probably a way around that, but I
didn't try that either.
解决上述问题的更直接的方法(来自 JAXB 教程): http://jaxb.java.net/tutorial/section_5_4-Adding-Documentation.html#Adding%20Documentation
A more direct approach (from the JAXB tutorial) which addresses the concerns above: http://jaxb.java.net/tutorial/section_5_4-Adding-Documentation.html#Adding%20Documentation
假设您已从
.xsd
生成了.java
文件 - 是的,它们是您可以修改、注释和记录的常规类。Assuming you have generated
.java
files from.xsd
- yes, they are regular classes which you can modify, comment and document.