Hi again, We're getting this to work: pointcut bcMethodsTransactionAfterMethods(Transaction tx): (execution (!private * com.ericsson.nms.cif.cs.*.*(.., Transaction)) && args(.., tx) );
before(Transaction tx): bcMethodsTransactionBeforeMethods(tx) { CsTrace.traceTransaction( thisJoinPointStaticPart.getSignature().getDeclaringTypeName(), thisJoinPointStaticPart.getSignature().getName(), thisJoinPoint.getArgs(), tx); } But it doesn't seem to work when the Transaction object is null? Is that expected? /David ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vincenz Braun Sent: 07 February 2007 14:50 To: aspectj-users@eclipse.org Subject: Re: [aspectj-users] Matching methods with a particular argument type One can use .. in the front and the back in method patterns (more than once). But you get a compilation error when using more than one .. in args pointcut designators. This is a compiler limitation because of ambiguousness in the binding. And a before(): execution(* *.*(.., String, ..)) { } public class SignatureTest { public void test(String arg) { } } will match the SignatureTest.test(String). And a before(String arg): execution(* *.*(.., String, ..)) && args(.., args, ...) { } will cause a compilation error: uses more than one .. in args (compiler limitation) Am 07.02.2007 um 15:20 schrieb Eric Bodden: No, I think think this is even syntactically wrong cause you cannot have ".." both in the front and back. IMHO there is no way to match on methods which have a String parameter at an arbitrary place (without using reflection at least). Eric On 2/7/07, Marco Mistroni <[EMAIL PROTECTED]> wrote: Hi, Would the last case match: com.ericsson.nms.cif.cs.Aclass.Amethod(String something); ??? my 2 cents here. Not in my opinion... It will match any methods which have 3 parameters in which the second one is a String..... anyone could correct me if i m wrong? regards marco Regards, David _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org <https://dev.eclipse.org/mailman/listinfo/aspectj-users> https://dev.eclipse.org/mailman/listinfo/aspectj-users _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users -- Eric Bodden Sable Research Group McGill University, Montréal, Canada _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users -- vincenz braun evelox Consulting GmbH & Co. KG email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> phone: +49 700 VINCEBRAUN mobile: +49 179 2190118
_______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users