Well some byte code manuplation apis are availble like Javassist.
But, I am still interested why AOP will not work in your case.
Have you really read the concept? Don't mind its just I am big fan of spring AOP.
SCJP 91%, SCWCD 97%
Bang Nguyen
Greenhorn
Joined: Feb 03, 2009
Posts: 15
posted
0
Mark Spritzler wrote:Actually, you can with Spring AOP.
It is called Introductions, and here is a link to the docs that shows how to do this
Hi, actually I don't believe IntroductionInterceptor can change class dynamically. I think it can intercept and add additional features that the original Java class doesn't have. I posted a question regarding this. Check it out and see if it's your case or not:
Shashank Ag wrote:Well some byte code manuplation apis are availble like Javassist.
But, I am still interested why AOP will not work in your case.
Have you really read the concept? Don't mind its just I am big fan of spring AOP.
well, javassist can't change class behavior after they are created, but that's exactly what I need.
These introduction methods are added to the code via AOP/Proxies and are created at runtime, not a special compile time thing to do. Spring AOP creates DynamicProxies at runtime.
Mark
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.