Open
Description
Scala does not have any way of placing annotations on a package.
In Java, package annotations are placed before the package
statement in a Java source file named package-info.java
. The compiler generates an interface named package-info
and attaches those annotations to it. These annotations (if they have a retention policy of RUNTIME
) can then be looked at with some methods on java.lang.Package
.
See also: [http://java.sun.com/docs/books/jls/third_edition/html/packages.htmlSI-7.4.1.1 JLS 3rd Ed. � 7.4.1.1]
The most obvious syntax for this is to allow annotations on package objects. This might result in confusion, though, since package objects have their own, distinct class files.