| Re: [aspectj-users] How to get an initialized instance reference from constructor pointcut? |
after()ÂreturningÂ(ArrayListÂl):Âcall(ArrayList.new(..)) && target(l) {
ÂÂÂ ...
}
Hi, everyone.I'm using aspectJ to help me get an initialized instance reference after its constructor called.ÂAt first, I wrote some code like this:after()ÂreturningÂ(ArrayListÂl):Âcall(ArrayList.new(..))
butÂthe reference l I got seems not be initialized yet.
This is the first rule mentioned inÂhttp://dev.eclipse.org/mhonarc/lists/aspectj-users/msg00019.html
Then I changed my code into this:
after(ArrayList l)Âreturning:Âthis(l) &&execution(ArrayList.new(..))
(which is written according to the second rule mentioned in msg00019)
but this time, no matched join point has been found in the program...
My question is : how can I getÂan initialized instance reference using AspectJ?
Thanks very much!
Vivian
--
Jin Shao
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users