mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-26 05:57:44 +02:00
1b6e9edfac
These changes are both (a) a performance optimization, and (b) an improvement on the binding across || rules that we implemented in 1.2.1. Instead of saying the the first binding in a left-to-right traversal of the pointcuts DNF is the one that you get (too much to ask users to do DNF rewriting in their heads), this version implements the rule that every || branch in the DNF must bind all formals, and if two || branches can have any join points in common (can match join points of the same kind), then both must bind all formals identically. So it allows things like execution(* *(..)) && args(x) || call(* *(..)) && this(x) which previously we used to forbid. But primarily it turned out to be a performance optimization.
8 lines
145 B
Java
8 lines
145 B
Java
aspect IfPointcut {
|
|
|
|
after(A a, B b) returning:
|
|
execution(* foo(*,*)) &&
|
|
(args(b,a) || args(a,b)) {
|
|
System.out.println("Woven");
|
|
}
|
|
} |