Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ execution pointcut with package annotations

Hi Nick,

> I saw some (very) old documentation and messages that referenced doing this and said the ability to use package and parameter annotations was removed in 1.5 and would be re-added at a later date. I know parameter annotations are supported again, because I'm using them, but I can't figure out package annotations.

Not quite sure where you read it was removed?  The online doc is still
up to date in this regard (and unfortunately it isn't good news):

http://www.eclipse.org/aspectj/doc/released/adk15notebook/annotations-pointcuts-and-advice.html

"Package and Parameter Annotations
Matching on package annotations is not supported in AspectJ. Support
for this capability may be considered in a future release.
Parameter annotation matching is being added in AspectJ1.6. Initially
only matching is supported but binding will be implemented at some
point."

We just don't get enough users requesting package based matching, so
haven't done that work.  I am not sure we even have an enhancement
request open from someone asking for it.  Right now I get more
requests for meta annotation based matching than package matching...
sorry it isn't better news.

cheers,
Andy

On 17 February 2011 12:05, Nick Williams <nicholas@xxxxxxxxxxxxxxxxxxxx> wrote:
> I spent considerable time on Google researching how to do this, and searched through Bugzilla and the mailing list archives, but didn't find anything that was't several years old and/or from AspectJ 1.5. I'm using 1.6.10 now and am hoping there is some updated information to be had somewhere.
>
> I have some packages annotated (in package-info.java) with @MyPackageLevelAnnotation, and I need to assign execution pointcuts to all methods within all classes within those packages (and, if possible, within all sub-packages). In Aspect language, how do I go about doing this? I can successfully do so for methods and/or classes annotated with this, but I haven't been able to with package annotations.
>
>
> Anybody have anything that might help me?
>
> Thanks,
>
> Nick
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top