为什么下面的代码:
pointcut callsToList() : call(* List.*(..));
before(List l) : callsToList() && target(l) {
System.out.println("cool");
}
生成以下警告:
org.eclipse.ajdt.examples.ListAdvice 中定义的建议尚未应用 [Xlint:adviceDidNotMatch]
我正在使用 Eclipse。我安装了eclipse aspectj 插件,当然我的项目是一个 aspectj 项目。
编辑:此外,我从 ajdt 插件提供的工作示例开始:
pointcut callsToBeginTask() : call(void IProgressMonitor.beginTask(..));
before() : callsToBeginTask() {
System.out.println("cool");
};
除了这个例子在没有警告的情况下工作之外,我看不出任何区别......