#ReflectiveAccessByInstrumentationAgents
Alan Bateman
Alan.Bateman at oracle.com
Fri May 6 06:29:10 UTC 2016
On 05/05/2016 23:26, Peter Levart wrote:
>
> What about adding an all-powers addModuleExports(module, pn, other)
> method to java.lang.instrument.Instrumentation (like it was done with
> addModuleReads) to simplify the agent's task? An agent could be
> considered trusted code, couldn't it?
It was looked into but has the potential to break encapsulation in
arbitrary ways. I think we have to see how far we can get with injecting
code into the target module to export the packages to the agent or other
module that the agent is arranging to access the internals.
-Alan
More information about the jigsaw-dev
mailing list