Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] [aj5] Javaagent reload ??

Alexandru Popescu wrote:

I don't think this is possible. In order to make the JVM unload the classes, you should be able to assure that those are not referenced anymore and their parent classloader can be destroyed.

hmmm, it looks like a very interesting question :-).

if you take a look at
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/instrument/Instrumentation.html
you'll notice redefineClasses(ClassDefinition[]) method that looks promising. Unfortunately as of Sun JDK 1.5.0 it cannot add, remove or change signature of methods nor modify inheritance, so it is not sufficient for the kind of class modifications AJ performs. Maybe in future releases...

R.


Back to the top