Bug 83935

Summary: @AJ and formal binding impl
Product: [Tools] AspectJ Reporter: Alexandre Vasseur <avasseur>
Component: CompilerAssignee: Alexandre Vasseur <avasseur>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: DEVELOPMENT   
Target Milestone: 1.5.0 M3   
Hardware: All   
OS: All   
Whiteboard:

Description Alexandre Vasseur CLA 2005-01-28 10:29:18 EST
Some notes on formal binding impl for @AJ

In code style, the advice signature is always looking the same
(..bindings.., org.aspectj.lang.Part thisJoinPointStaticPart, JoinPoint
thisJoinPoint, org.aspectj.lang.Part thisEnclosingJoinPointStaticPart)

In @ style, it is user defined.

The current impl is handling the formal binding in a way that only
args/this/target can be bound.
I had to add some conditionals to handles cases like that:
void myAdvice(JoinPoint jp, Object target) {..}
where target() binding is at index 1, while the index 0 is not an unbound but
actually "virtually" bound to the joinpoint.

Pointcut are thus having a virtuallyBoundedNames String[] that is the list of
arguments for which we don't want any complain if it not bound.
This one is populated during  @ extraction, and Pointcut.concretize() make sure
the info is not lost when composition occurs (with PerClause f.e.)

The only issue is that currently, binding JP/SJP/ESJP themselves is not possible
f.e. "... && args(jp)" myAdvice(JoinPoint jp, JoinPoint currentJp)
Is that a big issue ?
May be impact adviceexecution() and could impact some use cases around mock testing.
Comment 1 Alexandre Vasseur CLA 2005-07-11 11:05:56 EDT
reviewed and fixed + test, all bindings and arg binding are supported and error
is supposed to be seen when formal binding is missing

close when M3 ships
Comment 2 Alexandre Vasseur CLA 2005-09-27 09:25:32 EDT
was M3 remind
Comment 3 Alexandre Vasseur CLA 2005-09-27 09:25:44 EDT
was M3 remind