Why can AspectJ pick out local variables (or array elements or …)?

0
Posted

Why can AspectJ pick out local variables (or array elements or …)?

0

Users have sometimes wanted AspectJ to pick out many more join points, including • method-local field access • array-element access • loop iteration • method parameter evaluation Most of these have turned out not to make sense, for a variety of reasons: • it is not a commonly-understood unit for Java programmers • there are very few use-cases for advice on the join point • a seemingly-insignificant change to the underlying program causes a change in the join point • pointcuts can’t really distinguish the join point in question • the join point would differ too much for different implementations of AspectJ, or would only be implementable in one way We prefer to be very conservative in the join point model for the language, so a new join point would have to be useful, sensible, and implementable. The most promising of the new join points proposed are for exception throws clauses and for synchronized blocks.

Related Questions