JDK5 came with generic support for instrumentation:
it however requires changes to the way one invokes Java.
NetBeans Platform also needs such kind of patching from time to time, yet it would be better to do it in a modular way. E.g. be able to define a module which can provide transformation behavior which would then be applied to other loaded classes.
It would be nice to reuse the API already defined by java.lang.instrument package.
Y01 Need support for OSGi in Equinox mode
Y02 Need documentation and a use-case description in arch.xml
Re. Y01: Netbinox now supported: http://hg.netbeans.org/ergonomics/rev/1809b61e5c46
Intended usage can be seen in following OSGi bundles:
one of them defined Agent-Class and hopes that every module/bundle that depends on it will be processed by its JsAgent class.
I fixed the documentation. Unless there are objections I integrate tomorrow:
Merged as 6869874b14af to core-main.