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

Title: Message
Hi Wim,
Try :
pointcut runAction():call( * Method.invoke(Object, Object[]) ) && withincode( * Invoker.invoke(..));
Note the '..' instead of '*' for the Invoker.invoke method.
-----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


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.



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

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