[jboss-dev-forums] [Design of AOP on JBoss (Aspects/JBoss)] - Using ClassInfo in AOP

kabir.khan@jboss.com do-not-reply at jboss.com
Tue Jan 6 05:50:04 EST 2009


Ståle,

I think the first thing to do is to fix jboss-reflect (alternatively hack together a prototype in aop before fixing this in jboss-reflect). http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199605#4199605.

I have not looked at the AOP side of this for a while, but the most important initial thing is to unify the duplicate code in the pointcut matchers so that they come in one version all using ClassInfo. I would concentrate on the weaving part first:

Weaving
======
1) Create a javassist Type/ClassInfo for the class being woven in the instrumentor from the CtClass and ClassLoader.
2) Modify the instrumentor, transformers and pointcut matchers to use ClassInfo instead of CtClass. We still want to use the raw CtClass when adding wrapper methods, inner classes etc. to the class being woven since ClassInfo does not support that. So the minimum required for this step is probably to use ClassInfo for what is passed into the matchers.

Runtime
======
1) When recaclulating the advisor chains use the reflect version of ClassInfo and modify the matchers to use that.

Once this is done, we can look at other places to add ClassInfo. 

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199716




More information about the jboss-dev-forums mailing list