What is JAXB generated package-info.java

前端 未结 3 721
猫巷女王i
猫巷女王i 2020-12-24 12:55

I\'m trying to find some information on what the package-info.java file generated by the JAXB xjc commandline app actually does. All that is in

相关标签:
3条回答
  • 2020-12-24 13:12

    This is also useful when you generate javadoc

    package-info.java - Can contain a package declaration, package annotations, package comments and Javadoc tags. This file is new in JDK 5.0, and is preferred over package.html.

    source : http://download.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#sourcefiles

    0 讨论(0)
  • 2020-12-24 13:27

    package-info.java is a way to apply java annotations at the package level. In this case Jaxb is using package-level annotations to indicate the namespace, and to specify namespace qualification for attributes (source).

    0 讨论(0)
  • 2020-12-24 13:31

    If you want to define default namespace for elements in your java model, you can define it in package-info.java

    0 讨论(0)
提交回复
热议问题