[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Annotation Pointcut
|
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 <aminmc@xxxxxxxxx> 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
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
--
mailto:matthew@xxxxxxxxxxxxxxx
skype:matthewadams12
yahoo:matthewadams
aol:matthewadams12
google-talk:matthewadams12@xxxxxxxxx
msn:matthew@xxxxxxxxxxxxxxx
http://matthewadams.me
http://www.linkedin.com/in/matthewadams