Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Parameter annotation being ignored

Ravi,
It looks like your email client is doing something funny because I created a new thread.
Check out http://www.nabble.com/AspectJ---users-f2219.html and you will see that my question was not in reply to any other thread.
Even funnier is the fact that your reply is not grouped with my question, instead it's coming on its own thread.

BTW, thanks for your reply.
I originally tried execution(void *((@ManageConnection *)) too but now I understand that this matches when the object that is being passed belongs to a type annotated with @ManageConnection.
Putting brackets around the parameter like @ManageConnection(*) matches when parameters declaration itself in annotated. This was the subtlety in the syntax that I was missing.  

Thanks
Tahir Akhtar

Ravichandra C wrote:

Hi,

 

The first mistake u r doing is putting ur qn in some-bodies thread. Please create ur own thread.

 

Now coming to ur problem:

 

When u say: (call(void *(..) throws Exception+) && @args(m))

 

What u r telling is:

 

Cut all the methods matching: void *(..)

 

and then: assign the arguments of such methods to the variable m.

 

to fix the problem you may:

 

  1. create ur own thread for the qn
  2. pointcut annotatedWithManageConnection(SomeAnnotation in, ManageConnection m): (call(void *(.. && @annotation(in)) throws Exception+) && @args(m));

 

 

hope this helps,

Ravi


This email is sent for and on behalf of Ivy Comptech Private Limited. Ivy Comptech Private Limited is a limited liability company.

This email and any attachments are confidential, and may be legally privileged and protected by copyright. If you are not the intended recipient dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. Any views or opinions are solely those of the sender.  This communication is not intended to form a binding contract on behalf of Ivy Comptech Private Limited unless expressly indicated to the contrary and properly authorised. Any actions taken on the basis of this email are at the recipient's own risk.

Registered Office:

Ivy Comptech Private Limited, Cyber Spazio, Road No. 2, Banjara Hills, Hyderabad 500 033, Andhra Pradesh, India.

Registered number: 37994. Registered in India. A list of members' names is available for inspection at the registered office.



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


Back to the top