When a new package is being created in Eclipse Juno, a java file (package-info.java) would be created automatically. What is the use of that file? Is it useful in importing specific classes in another class?
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.
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).
package-info.java
is a package comment file, used by Javadoc for giving your package its own documentation.
It was introduced in Javadoc 5.0, and replaces package.html
.
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