java - What's the point of package annotations? -


i understand purpose of class annotations, how , annotations used in java?. purpose of package annotations, described in blog post , §7.4.1 of java language specification?

why want associate metadata package? kinds of things do?

  1. bnd tool (and maven-bundle-plugin) makes use of package annotations. putting @version , @export annotation in package-info.java allows generate osgi metadata.
  2. javadoc uses package annotations.
  3. jaxb uses package-level annotations, for example, specify mapping of java type xml schema type package-wide. package annotations used in jboss's xml binding.
  4. struts 2 convention plugin uses an annotation specify default interceptor actions in package.
  5. there package-level hibernate annotations. example of annotations' usage can found here.

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -