Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] withincode question

Thanks for the tip, I also had to change the Method.invoke() to Method.invoke(..), then it works as it should.

regards,

Wim



2006/6/8, Conway. Fintan (IT Solutions) < Fintan.Conway@xxxxxx>:
Hi Wim,
 
Try :
pointcut runAction():call( * Method.invoke(Object, Object[]) ) && withincode( * Invoker.invoke(..));
Note the '..' instead of '*' for the Invoker.invoke method.
 
Regards,
 
Fintan
 
-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx ] On Behalf Of Wim Deblauwe
Sent: 08 June 2006 14:44
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] withincode question

Hi,

I have question on withincode. Consider this:

public class Invoker
{
  public Object invoke( MyObject myObject )
  {
    // code omitted to transform myObject to a Method object and the needed arguments

   return method.invoke( object, object[] );
}

I want to write a pointcut that matched with the method.invoke() call but only within the invoke method of the Invoker class. I tried this, but eclipse tells me that it does not match:

pointcut runAction():call( * Method.invoke(Object, Object[]) ) && withincode( * Invoker.invoke(*));

I also tried "within" in stead of "withincode", but it also does not work.

regards,

Wim




* ** *** ** * ** *** ** * ** *** ** *
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.
Any views or opinions presented are solely those of the author, and do not necessarily represent those of ESB.
If you have received this email in error please notify the sender.

Although ESB scans e-mail and attachments for viruses, it does not guarantee
that either are virus-free and accepts no liability for any damage sustained
as a result of viruses.

* ** *** ** * ** *** ** * ** *** ** *

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top