Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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


Back to the top