Hi all,
I'm writing a custom class loader that exploits Javassist to manipulate classes 
on the fly. This is what I'd like to do:
1) start with a clear class (not manipulated) loaded from the root custom 
classloader
2) manipulate the class inserting an interface on it, load the class with a 
custom classloader child of the root one
3) cast the new instance to the added interface
4) reload the class without the interface with a third loader, child of the 
root one

Now, steps from 1-3 works, but I'm not able to remove the interface. Or better, 
if I reload the class without the interface and try to cast it to the interface 
I success. The problem seems that after step 2 the class is frozen to the one 
with the interface and its definition is not allowed. I've tried to defrost the 
class, but it does not work. Please note that the clean class is firstly loaded 
without any manipulation, in order to provide a clean in memory image of the 
class.

Any suggestion?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128164#4128164

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128164
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to