Chapter 11. Other Changes in AspectJ 5
Prev |  | Next

## Chapter 11. Other Changes in AspectJ 5

## Pointcuts

AspectJ 5 is more liberal than AspectJ 1.2.1 in accepting pointcut expressions that bind context variables in more than one location. For example, AspectJ 1.2.1 does not allow:

           	pointcut foo(Foo foo) : (execution(* *(..)) && this(foo) ) ||
           	                                (set(* *) && target(foo));

whereas this expression is permitted in AspectJ 5. Each context variable must be bound exactly once in each branch of a disjunction, and the disjunctive branches must be mutually exclusive. In the above example for instance, no join point can be both an execution join point and a set join point so the two branches are mutually exclusive.

Prev | Home | Next
Chapter 10. New Reflection Interfaces | Up | Declare Soft