Bug 83935 - @AJ and formal binding impl
Summary: @AJ and formal binding impl
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.5.0 M3   Edit
Assignee: Alexandre Vasseur CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-28 10:29 EST by Alexandre Vasseur CLA
Modified: 2005-09-27 09:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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