Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] execution(Foo.bar(int) && args(i)?

<<<
Is it also allowed to use "args" in combination with
"execution"?
>>>

Yes.

> Case 1: Yes. Then what about something like pointcut pc(int i):
> execution(Foo.bar(int) && call(Foo1.bar1(int)) && args(i); ? That
> would be ambiguous, would'n it?

This pointcut would pick out no join points, since you are asking for the
set of all JPs which are both call AND execution join points. Since no join
point can be both, your PC would not match.

Does this help?

Nick

--- Eric Bodden <eric@xxxxxxxxx> wrote:

>  
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi.
> 
> I am getting somewhat confused by the args-pointcut. I understand
> that "args" picks out the runtime arguments of a "call" pointcut. My
> question is: Is it also allowed to use "args" in combination with
> "execution"?
> 
> Case 1: Yes. Then what about something like pointcut pc(int i):
> execution(Foo.bar(int) && call(Foo1.bar1(int)) && args(i); ? That
> would be ambiguous, would'n it?
> 
> Case 2: No. Then, how am I able to expose any arguments that were
> given to the currently executing method?
> 
> Cheers,
> Eric
> 
> - --
> Eric Bodden
> RWTH Aachen University
> ICQ UIN: 12656220, Skype: ericbodden, PGP: BB465582
> Website: http://www.bodden.de
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 8.0.3
> 
> iQA/AwUBQVrVVswiFCm7RlWCEQIVhQCgulQe1nUuJEoGGjqSVy1FU2w/lAkAoMGN
> 2Don+HfYO0qbT0SsQRdGsHJ8
> =pnQ9
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev
> 



Back to the top