I want to write package level annotations. Can some tell how to write package-info.java in eclipse.
I want to add this info to it.
@javax.xml.bind.annotation.XmlSchema ( elementFormDefault=XmlNsForm.UNQUALIFIED ... )
Thanks.
Simply put, package-info is a Java file that can be added to any Java package.
The package-info. java is a Java file that can be added to any Java source package. Its purpose is to provide a home for package level documentation and package level annotations. Simply create the package-info.
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).
You have to create the file in the package using New -> File
.
New -> Class
will not allow you to create the file because the file name is not accepted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With