--add-opens for entire module
Nicolai Parlog
nipa at codefx.org
Thu Dec 29 09:50:52 UTC 2016
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi Andrew,
I think this is a great idea but would like to point out that the
syntax proposal is inconsistent. It looks like it would allow a module
to be opened to specific target modules:
--add-opens some.module=other.module
This is something that the module description does not allow - a
module is either open or not. Maybe you meant this?
--add-opens <module>(/<package>=<target-module>(,<target-module>)*)+
so long ... Nicolai
On 28.12.2016 08:30, Andrew Guibert wrote:
>
>
> In the currently accepted proposal for
> #ReflectiveAccessToNonExportedTypes [1], it is described that an
> entire module can be opened with the following example:
>
> open module foo.bar { exports com.foo.bar; requires
> hibernate.core; requires hibernate.entitymanager; }
>
> The current syntax for --add-opens option is:
>
> --add-opens <module>/<package>=<target-module>(,<target-module>)*
>
> Namely, the --add-opens option can only be used to open specific
> packages from a module, whilst in a module-info.java it is possible
> to open an entire module with a single directive. Therefore, I
> would like to propose altering the --add-opens option to more
> closely match what is achievable in a module-info file, such as:
>
> --add-opens
> <module>[/<package>]=<target-module>(,<target-module>)*
>
> So if a <package> is not specified, the entire module would be open
> for deep reflection at run time.
>
> Being able to open an entire module with a single JVM option will
> ease the migration of existing java programs to the new modular
> JDK. Specifically, it will allow developers to get our programs up
> and running in "toleration" mode more quickly, and then tackle a
> fine-grained set of open packages on a per-module basis.
>
> [1]
> http://mail.openjdk.java.net/pipermail/jpms-spec-experts/2016-October/
000430.html
>
>
- --
PGP Key:
http://keys.gnupg.net/pks/lookup?op=vindex&search=0xCA3BAD2E9CCCD509
Web:
http://codefx.org
a blog about software development
https://www.sitepoint.com/java
high-quality Java/JVM content
http://do-foss.de
Free and Open Source Software for the City of Dortmund
Twitter:
https://twitter.com/nipafx
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJYZNx7AAoJEMo7rS6czNUJuugQAIS5vRHWiYr6CAW0koE3nQPk
z4rwXvlXqch7LUp8TUbHjLaqipubSzLfgIQrB0EoOKQmPG+rGNTVsD7x0B+t+hci
dSEb2xUuuZUrZkpnRCJ1XAgoB3MG5MRsnmXXsVsI8DwzLIC6hJHb6K7C5Rtp4Rqr
TWBznDc16uFfzgR4IJAaaDa721Tsd3ZrffnrQJMPo7D5N/B7jzlXYY5gdgpP/kWD
UAMlLZW5CGubdUVCp2OtCzndOqkyAlHqL4S5JlhlCglhT5NOhUgmg4G36TSk0e5Y
Hss3m9kbiDdk1bgwc2qHJqRFsI4nw8J/ta6Cpv21yCYmakt/EMv1odCD5bU6D0tF
x+fmUZNTYai7+KPrSLgldD2+UwYP9lxx0BZUWyPjjgcj/cZQx8Do+lJSO87VVn6h
goloU75Tdi0FF2VMws43rKtDYbL1BT5lzxedGiaay1V53nLx/61adaGHDTmbKo6G
V0EWUl7e5XAiMt7MqmYb1yrjs7ZlHWktZoWxZtLXxU9P1rpn+Jc8EK1OGod79jH4
Ed4chkrh400EpzRltogtgaY1H02Ij6M89iSYKaGoJYG/048Xh4CzEli5Fodz0H3n
oaMDwkeVS3bC/sufq7QJwNeBr2on/TcAGV8p1SPpOMY5Sd8WXTe0CfycAI21aeiO
eQy75cn3qGOqUsIQHdA7
=H2tH
-----END PGP SIGNATURE-----
More information about the jigsaw-dev
mailing list