[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
] [
List Home
]
[aspectj-users] Match all method calls with a specific parameter type at any position
From
: Tahir Akhtar <
tahir@xxxxxxxxxxxxxxxxxxx
>
Date
: Wed, 10 Jun 2009 15:33:57 +0500
Delivered-to
: aspectj-users@eclipse.org
User-agent
: Thunderbird 2.0.0.21 (Windows/20090302)
Hi,
Is there a way to declare a pointcut that matches all method calls whose any parameter is of specific type (say java.sql.Connection).
I see that following will match methods whose last (or only) parameter is of type Connection.
pointcut havingAConnectionParameter(Connection conn): call(* *(..)) && args(..,conn );
And following will match methods whose first (or only) parameter is of type Connection.
pointcut havingAConnectionParameter(Connection conn): call(* *(..)) && args(conn, .. );
But how can I match when I don't know the exact position or even number of parameters in advance?
Regards Tahir Akhtar
Follow-Ups
:
Re: [aspectj-users] Match all method calls with a specific parameter type at any position
From:
Andy Clement
Re: [aspectj-users] Match all method calls with a specific parameter type at any position
From:
Tahir Akhtar
Prev by Date:
[aspectj-users] SecurityException when LT weaving aspects in java.*
Next by Date:
Re: [aspectj-users] SecurityException when LT weaving aspects in java.*
Previous by thread:
[aspectj-users] SecurityException when LT weaving aspects in java.*
Next by thread:
Re: [aspectj-users] Match all method calls with a specific parameter type at any position
Index(es):
Date
Thread