On 21/04/2016 12:09, Peter Levart wrote:
:
The situation is not so complicated, I think. If instrumented code
calls some code in your Byteman module(s) then you should 1st make
this code public and reside in exported packages. All you have to do
then is add read edges from modules of instrumented classes to modules
of Byteman classes that are called by instrumented code as they are
being instrumented.
If the instrumentation is just injecting code to call into Byteman then
I assume it just works now. That is, it doesn't appear that Byteman has
embraced modules yet and so I assume it must be an agent specified via
-javaagent with perhaps supporting code in other JAR files. In that
case, the Byteman code is the unnamed module of the app class loader and
the VM will automatically add a read edge when the transformer touches
code in any named module. This is the compatibility support that I
mentioned in another mail.
If you right this it should be simple as you say. On the other hand,
some of the mails mention accessing non-public members, setAccessible,
and even (it would appear) adjusting class loader delegation on the fly
to facilitate the patches.
-Alan