AspectWerkz 主要关注加载时间编织在 J2EE 应用程序环境中的紧密集成,而 AspectJ 更多地关注(静态)编译和编织、运行时性能和工具支持
work appoint pointcut advice
config:
in src:
Java 5.0 annotation
Javadoc mode annotation
xml config file:aop.xml or aspectwerkz.xml in src or classpath
src:
Object o=Proxy.newInstance(class,constructor argumentTypes,constructor argumentValues,useCache,makeAdvisable)
if makeAdvisable=true,implement Advisable
:::be prepared for programmatic, runtime, per instance hot deployement of advice
((Advisable)o).aw_addAdvice(pointcut,advice)
pointcut is string expressionInfo like "execution(* *(..))":package namespace.method(pargument):proxy all method
advice must implenet invoke(JoinPoint jp),jp method info and so on
in my osgi framework not work,o is not instanceof Advisable