Proposal: #ExportAnnotation
mark.reinhold at oracle.com
mark.reinhold at oracle.com
Mon Mar 6 17:19:25 UTC 2017
Issue summary
-------------
#ExportAnnotation -- Define a standard, source-retention `Export`
annotation which can be used in a `package-info.java` file to indicate
that the package is to be exported. Tools that create
`module-info.java` files could then interpret this annotation in order
to generate corresponding `exports` clauses. [1]
Proposal
--------
Do not implement this feature.
The declaration of a module is centralized in a single file in order to
make it easy to see exactly what a module exports, requires, uses, and so
forth. Distributing package-export information across a module's
`package-info.java` files would just make the related `module-info.java`
file more difficult to read. This is not a practice that we should
encourage.
If someone really wants to do this then they can easily define their own
annotation for this purpose.
[1] http://openjdk.java.net/projects/jigsaw/spec/issues/#ExportAnnotation
More information about the jpms-spec-observers
mailing list