Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Matching/capturing annotations

Thanks a whole lot.
I'm deeply impressed both by the clean approach of AOP, once you managed to read on in spite of a little headache and by the great (read: fast, helpful) responses on this mailinglist.

Vincent: That was exactly what I was looking for. Thanks again.

Ben

Am 26.10.2005 um 17:05 schrieb Vincent Jorrand:

you can use @annotation

 using your example:
     protected pointcut whateverMethod(Whatever instrumented) :
         call(@Whatever * *.*(..)) && @annotation(instrumented);

----- Original Message ----
From: Benjamin Podszun <ben@xxxxxxxxxxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Sent: Wednesday, October 26, 2005 10:46:46
Subject: [aspectj-users] Matching/capturing annotations

Hi again.

My last problem for the near future (I hope) is hopefully quite
simple: I want to match pointcuts to methods with annotations and get
access to that annotation in my advice. While I already can define
pointcuts as I'd like them to be (e.g.: call(@Whatever("foo") * *
(..)) ) I currently see no way to access the annotation in the
advice. In this specifiic case I'd like to see the value ("foo"), but
general access to annotations would be great. Any way to archive
that? I tried google, but always found pages that use annotations
instead of .aj files - not explanations for using aspectj connected
to "normal" annotations.
Isn't there some thisJoinPoint magic that returns the annotations?
Did I miss something obvious again?

Regards and thanks in advance,
Ben
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



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




Back to the top