Chapter 11. Other Changes in AspectJ 5

Table of Contents

Pointcuts
Binding of formals
Additional lint warnings
Declare Soft
Tools
Aspectpath

Pointcuts

Binding of formals

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.

Additional lint warnings

Discuss detection of common errors -> warning/error, eg. conjunction of more than one kind of join point. Differing numbers of args in method signature / args / @args / @parameters.