Hi Henrique, We tend to consider advice constructs as different to 'regular' methods. For example:
before(): execution(* *(..)) {} doesn't advise itself, or any other advices. The adviceexecution() pointcut is for working with advice join points. Coming at it from that angle, we are perhaps missing a construct like this: declare @advice: before(..): @MyAnnotation; But I haven't seen many use cases calling for it. cheers Andy 2010/12/1 Henrique Rebêlo <h...@cin.ufpe.br>: > Hi Andy, > > There is just one more question regarding annotation issue. > > I know that we can use supply annotations to methods such as: > > declare @method: @myAnnotation * *(..): @otherOne; > > My question is: Can we attach an annotation to a particular advice in which > was previously marked? > > For example, assume we have a method m() and a around advice marked with the > @my Annotation. So, the above syntax will affects only the method m()... My > conjecture is that it is supposed to attach any method-like including > advice. > > Thanks, > > Henrique > > 2010/11/23 Henrique Rebêlo <h...@cin.ufpe.br> >> >> Hi Andy, >> >> thanks for your valuable comments and suggestions. >> >>> No, you can't use @withincode like that. It is not an unreasonable >>> requirement, so raise a bugzilla if you'd like to see it in the >>> future. >> >> OK. I'll >> >> Kind Regards, >> >> Henrique >> >> On Tue, Nov 23, 2010 at 11:08 AM, Andy Clement <andrew.clem...@gmail.com> >> wrote: >>> >>> No, you can't use @withincode like that. It is not an unreasonable >>> requirement, so raise a bugzilla if you'd like to see it in the >>> future. >>> >>> cheers >>> Andy >>> >>> 2010/11/23 Henrique Rebêlo <h...@cin.ufpe.br>: >>> > Hi Andy and all, >>> > >>> > Yes, this documentation is helpful! Thanks. >>> > >>> > One more thing: Can I specify a property based matching by using a >>> > @withincode or @annotation? >>> > >>> > For example: We can have >>> > >>> > execution(@Trace !...@trace(TraceLevel.NONE) * *(..)) >>> > >>> > So, Can we use in a similar way when using a @ withincode for instance? >>> > >>> > Something like: @withincode(Trace(Tracel.Level.NONE)) >>> > >>> > Thanks, >>> > >>> > Henrique >>> > >>> > >>> > On Tue, Nov 23, 2010 at 9:32 AM, Andy Clement >>> > <andrew.clem...@gmail.com> >>> > wrote: >>> >> >>> >> Not sure what kind of matching you want to do (kind of joinpoint, kind >>> >> of annotation value). If I understand what you mean, there is already >>> >> some support for this, see the "annotation value matching" section in >>> >> (this is execution joinpoint, enum annotation value): >>> >> >>> >> http://www.eclipse.org/aspectj/doc/released/README-160.html >>> >> >>> >> optimized binding of values is in: >>> >> http://www.eclipse.org/aspectj/doc/released/README-161.html >>> >> >>> >> cheers, >>> >> Andy >>> >> >>> >> 2010/11/23 Henrique Rebêlo <h...@cin.ufpe.br>: >>> >> > Hi Andy and all, >>> >> > >>> >> > Enjoying the subject of join points and annotations, >>> >> > >>> >> > I want to know if there is a possibility to match an annotated join >>> >> > point >>> >> > based on its property. However, without using the if pointcut... >>> >> > >>> >> > Thanks, >>> >> > >>> >> > Henrique >>> >> > >>> >> > On Tue, Nov 23, 2010 at 8:06 AM, Andy Clement >>> >> > <andrew.clem...@gmail.com> >>> >> > wrote: >>> >> >> >>> >> >> Annotation: >>> >> >> >>> >> >> - augmenting (new values in existing annotations) >>> >> >> - replacing (of annotations/annotation values) >>> >> >> - removal of annotations >>> >> >> >>> >> >> are all candidate features. >>> >> >> >>> >> >> First two are here: >>> >> >> https://bugs.eclipse.org/bugs/show_bug.cgi?id=313026 >>> >> >> >>> >> >> Haven't quite raised the bugzilla for the third yet, but might do >>> >> >> the >>> >> >> work under that existing 313026. >>> >> >> >>> >> >> I'm seeing an increasing number of use cases for these features so >>> >> >> they aren't too far away. >>> >> >> >>> >> >> cheers, >>> >> >> Andy >>> >> >> >>> >> >> On 23 November 2010 01:07, Frank Pavageau >>> >> >> <frank.pavag...@gmail.com> >>> >> >> wrote: >>> >> >> > Note that you can't modify an existing annotation, which would be >>> >> >> > quite useful in that context : changing the cache strategy >>> >> >> > between >>> >> >> > read-write and read-only for example (even if you have the >>> >> >> > source, >>> >> >> > different usage patterns can use different strategies on the same >>> >> >> > entities), or the fetching strategy indeed. It would be a useful >>> >> >> > AspectJ improvement IMHO, but there might be issues which explain >>> >> >> > why >>> >> >> > it's not possible. Maybe Andy (or someone else) can shed some >>> >> >> > light >>> >> >> > on >>> >> >> > it. >>> >> >> > >>> >> >> > Frank >>> >> >> > >>> >> >> > On Tue, Nov 23, 2010 at 8:58 AM, >>> >> >> > <jeanlouis.pastu...@orange-ftgroup.com> wrote: >>> >> >> >> Pffffffffffft : Sorry for the noise. All is explained in >>> >> >> >> documentation >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> >> http://www.eclipse.org/aspectj/doc/released/adk15notebook/annotations-declare.html >>> >> >> >> >>> >> >> >> Cordialement / Best regards >>> >> >> >> >>> >> >> >> Jean-Louis Pasturel >>> >> >> >> >>> >> >> >> ________________________________ >>> >> >> >> De : aspectj-users-boun...@eclipse.org >>> >> >> >> [mailto:aspectj-users-boun...@eclipse.org] De la part de >>> >> >> >> jeanlouis.pastu...@orange-ftgroup.com >>> >> >> >> Envoyé : mardi 23 novembre 2010 08:19 >>> >> >> >> À : aspectj-users@eclipse.org >>> >> >> >> Objet : [aspectj-users] aspectj joinpoint *for* Annotation ? >>> >> >> >> >>> >> >> >> is there a mean to weave and overload an annotation with AspectJ >>> >> >> >> LTW ? >>> >> >> >> >>> >> >> >> It would be interesting, for example to test with LTW weaving >>> >> >> >> ORM ( >>> >> >> >> Hibernate for fetching plan / strategy => lazy, eager) or >>> >> >> >> caching >>> >> >> >> policy >>> >> >> >> ( Entirty/query cachable or not) when annotations are used >>> >> >> >> instead >>> >> >> >> of >>> >> >> >> XML >>> >> >> >> files and we have not the source code and the IDE to modify / >>> >> >> >> re-compile >>> >> >> >> code. Useful in stressing tests to optimize configurations. >>> >> >> >> >>> >> >> >> >>> >> >> >> Cordialement / Best regards >>> >> >> >> >>> >> >> >> Jean-Louis Pasturel >>> >> >> >> >>> >> >> >> ********************************* >>> >> >> >> This message and any attachments (the "message") are >>> >> >> >> confidential >>> >> >> >> and >>> >> >> >> intended solely for the addressees. >>> >> >> >> Any unauthorised use or dissemination is prohibited. >>> >> >> >> Messages are susceptible to alteration. >>> >> >> >> France Telecom Group shall not be liable for the message if >>> >> >> >> altered, >>> >> >> >> changed >>> >> >> >> or falsified. >>> >> >> >> If you are not the intended addressee of this message, please >>> >> >> >> cancel >>> >> >> >> it >>> >> >> >> immediately and inform the sender. >>> >> >> >> ******************************** >>> >> >> >> >>> >> >> >> ********************************* >>> >> >> >> This message and any attachments (the "message") are >>> >> >> >> confidential >>> >> >> >> and >>> >> >> >> intended solely for the addressees. >>> >> >> >> Any unauthorised use or dissemination is prohibited. >>> >> >> >> Messages are susceptible to alteration. >>> >> >> >> France Telecom Group shall not be liable for the message if >>> >> >> >> altered, >>> >> >> >> changed >>> >> >> >> or falsified. >>> >> >> >> If you are not the intended addressee of this message, please >>> >> >> >> cancel >>> >> >> >> it >>> >> >> >> immediately and inform the sender. >>> >> >> >> ******************************** >>> >> >> >> >>> >> >> >> _______________________________________________ >>> >> >> >> aspectj-users mailing list >>> >> >> >> aspectj-users@eclipse.org >>> >> >> >> https://dev.eclipse.org/mailman/listinfo/aspectj-users >>> >> >> >> >>> >> >> >> >>> >> >> > _______________________________________________ >>> >> >> > aspectj-users mailing list >>> >> >> > aspectj-users@eclipse.org >>> >> >> > https://dev.eclipse.org/mailman/listinfo/aspectj-users >>> >> >> > >>> >> >> _______________________________________________ >>> >> >> aspectj-users mailing list >>> >> >> aspectj-users@eclipse.org >>> >> >> https://dev.eclipse.org/mailman/listinfo/aspectj-users >>> >> > >>> >> > >>> >> > >>> >> > -- >>> >> > >>> >> > >>> >> > ............................................................................................................................... >>> >> > Henrique Rebelo >>> >> > http://www.cin.ufpe.br/~hemr >>> >> > Informatics Center, UFPE, Brazil >>> >> > >>> >> > _______________________________________________ >>> >> > aspectj-users mailing list >>> >> > aspectj-users@eclipse.org >>> >> > https://dev.eclipse.org/mailman/listinfo/aspectj-users >>> >> > >>> >> > >>> >> _______________________________________________ >>> >> aspectj-users mailing list >>> >> aspectj-users@eclipse.org >>> >> https://dev.eclipse.org/mailman/listinfo/aspectj-users >>> > >>> > >>> > >>> > -- >>> > >>> > ............................................................................................................................... >>> > Henrique Rebelo >>> > http://www.cin.ufpe.br/~hemr >>> > Informatics Center, UFPE, Brazil >>> > >>> > _______________________________________________ >>> > aspectj-users mailing list >>> > aspectj-users@eclipse.org >>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users >>> > >>> > >>> _______________________________________________ >>> aspectj-users mailing list >>> aspectj-users@eclipse.org >>> https://dev.eclipse.org/mailman/listinfo/aspectj-users >> >> >> >> -- >> >> ............................................................................................................................... >> Henrique Rebelo >> http://www.cin.ufpe.br/~hemr >> Informatics Center, UFPE, Brazil > > > > -- > ............................................................................................................................... > Henrique Rebelo > http://www.cin.ufpe.br/~hemr > Informatics Center, UFPE, Brazil > > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users