Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Stateful JoinPoints

Hello,

I am wondering if there is any interest in permitting JoinPoint.StaticPart instances to contain state in AspectJ and, indeed, if it is even possible. The idea would be to allow extending the JoinPoint.StaticPart class to include whatever state was necessary. Then, from within an advice, this state could be accessed via a downcast.

The key use for this I have in mind is to permit per JoinPoint enable flags. Thus, either inside the advice or via an if(...) pointcut, the advice code would be executed only if this flag is true, permitting dynamic, fine-grained control over when advice is applied. In other words, we can at runtime prevent advice from being executed at individual JoinPoints.

One issue I can see is that, it would be desirable to change this flag outside of the advice itself. Thus, some mechanism is needed to identify the individual JoinPoint instances.

Any help/comments on this would appreciated.

David J. Pearce




Back to the top