Hi there. Thanks for your reply. Can't believe I missed that! I've added the .. And it works to a certain extent. If my class doesn't extend IndexWriter then all the methods with the annotation get advised. When it extends the class no methods in the subclass get advised.
Obviously I'm missing something. Not sure what. Thanks Amin Sent from my iPhone On 1 Sep 2010, at 13:44, Matthew Adams <[email protected]> wrote: > My guess is your method expression of "* *(*)", which means any method > with any return type that takes exactly one parameter of any type". > If you really mean any method, regardless of the number of arguments & > types, then you'd want "* *(..)", which would make your pointcut: > > @Pointcut("execution(@org.aminmc.remote.search.lucene.event.PublishEvent > * *(..)) && @annotation(event)") > > -matthew > > On Tue, Aug 31, 2010 at 3:13 PM, Amin Mohammed-Coleman <[email protected]> > wrote: >> Hi All >> >> I am trying to match joinpoints that have the following annotation: >> >> @PublishEvent >> >> my pointcut definition looks like this: >> >> @Pointcut("execution(@org.aminmc.remote.search.lucene.event.PublishEvent * >> *(*)) && @annotation(event)") >> >> with the following advice: >> >> @After("publishEvent(event)") >> public void handleEvent(final JoinPoint jp, final PublishEvent event) { >> .... >> } >> >> The problem I am noticing is that I have a class that extends >> org.apache.lucene.index.IndexWriter and have overriden some of the methods >> and annotated them with @PublishEvent. However the advice is not being >> applied. I am using IntelliJ. What I notice is that if I remove the extends >> keyword from the class then some of the methods get advised. Not all >> methods get advised even though I have clearly marked the methods with >> @PublishEvent. >> >> I would be grateful for any assistance on this. >> >> Thanks >> Amin >> _______________________________________________ >> aspectj-users mailing list >> [email protected] >> https://dev.eclipse.org/mailman/listinfo/aspectj-users >> > > > > -- > mailto:[email protected] > skype:matthewadams12 > yahoo:matthewadams > aol:matthewadams12 > google-talk:[email protected] > msn:[email protected] > http://matthewadams.me > http://www.linkedin.com/in/matthewadams > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
