Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Annotation Pointcut

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

Back to the top