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)?

There's a missing parenthesis in your example, but I _think_ you mean:

pointcut pc(int i):
  execution(Foo.bar(int)) 
  && call(Foo1.bar1(int)) 
  && args(i);

This pointcut always picks out zero join points, since join point kinds are
exclusive:  there is no join point that is both a call and an execution join
point.

Note that using args over a _disjunction_, such as:

pointcut pc(int i):
  ( execution(Foo.bar(int)) || call(Foo1.bar1(int)) )
  && args(i);

works fine.

Or maybe I'm not understanding your question.

-erik

-----Original Message-----
From: aspectj-dev-admin@xxxxxxxxxxx [mailto:aspectj-dev-admin@xxxxxxxxxxx]
On Behalf Of Eric Bodden
Sent: Wednesday, September 29, 2004 8:32am
To: aspectj-dev@xxxxxxxxxxx
Subject: [aspectj-dev] execution(Foo.bar(int) && args(i)?
Sensitivity: Private

 
-----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