#ReflectiveAccessByInstrumentationAgents

Andrew Dinn adinn at redhat.com
Fri May 6 08:10:52 UTC 2016


On 06/05/16 07:29, Alan Bateman wrote:
> 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.

Well, actually, I am deliberately trying to break encapsulation in
arbitrary ways :-)

although it is not really quite that arbitrary. I am only doing so for
very strictly limited purposes (testing, monitoring/debugging) and only
so as to grant access to 'trusted' code.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the jigsaw-dev mailing list