LJC/vJUG Hackday query: Jigsaw encapsulation effects on frameworks and libraries

Mani Sarkar sadhak001 at gmail.com
Fri May 12 11:45:35 UTC 2017


*How will Jigsaws encapsulation affect frameworks like spring? I heard
there was some discussions around this since spring uses reflection and
depends on class that I would suspect would be unaccessible in the module?*

Mani: Martijn did provide a response to this query but if there is anything
the OpenJDK / Java 9 team would like to add to this.

*Alan Bateman:* There have been many discussions about this topic on the
jigsaw-dev list. There are two main issues here - one is the implementation
of the framework breaking into the JDK (to invoke the non-public
ClassLoader.defineClass for example). Here is where the frameworks should
be looking at the new reflection API java.lang.invoke and using Lookup
objects as capabilities. Lookup.defineClass provides an easy way to inject
code into the same runtime package as a user class for example. Separately,
the module system has evolved to support the ability to open packages for
deep reflection. We expect the frameworks will take advantage of that in
time once they have support for modules. The jigsaw-dev list is the best
place to bring up any further discussion on this topic.


@all - lets continue with this conversation here


Cheers,

Mani
-- 
@theNeomatrix369 <http://twitter.com/theNeomatrix369>*  |  **Blog
<http://neomatrix369.wordpress.com/>**  |  *LJC Associate & LJC Advocate
(@adoptopenjdk & @adoptajsr programs)
*Meet-a-Project - *MutabilityDetector
<https://github.com/MutabilityDetector>*  |  **Bitbucket
<https://bitbucket.org/neomatrix369>* * |  **Github
<https://github.com/neomatrix369>* * |  **LinkedIn
<http://uk.linkedin.com/pub/mani-sarkar/71/a77/39b>*
*Come to Devoxx UK 2017:* http://www.devoxx.co.uk/

*Don't chase success, rather aim for "Excellence", and success will come
chasing after you!*


More information about the jdk9-dev mailing list