[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[aspectj-users] New feature of Aspectj 1.6.11
- From: Pasturel <jean-louis.pasturel@xxxxxxxxx>
- Date: Sat, 11 Dec 2010 18:47:59 +0100
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:126.96.36.199) Gecko/20101027 Thunderbird/3.1.6
I open a new thread to discuss the new feature of 1.6.11 about declare annotation
The M1 comes with the removal of an annotation of field like specified in the readme :
declare @field: int Foo.i: -@Anno;
It gives me an idea with the + sign as this :
declare @field: int Foo.i: +@Anno(param=<newValue>);
that means a force replace : if @Anno exists remove it and replaces with the new parametrized @Anno.If not already exists creates it with the parametrized Anno.
Without the - sign and without the + sign, it creates the Annotation on field or if already exists throws an exception ( that is certainly the current behavior => Andy?).
What do you think about that ?
I didn't write about using it in that way as we don't 100% yet define
the rules there - well I might define it as undefined right now:) It
might work right now but I'd need to confirm I want that ordering to
remain reliable and stable. Any values you specify for the removal
are actually not used right now, the removal is done based solely on
the name - this means you'll get what you want if the removal runs
first. I might add value matching enforcement later. Yes, at some
point it will be added across all the declare annotation forms for
On 9 December 2010 23:14,<jeanlouis.pasturel@xxxxxxxxxxxxxxxxxx> wrote:
I see that 1.6.11M1 includes removal Annotation for field.
Just a question :
Is this kind of declare annotation below, supported in the same aspect : ?
public class MyAspect
declare @field: int Foo.i: -@Anno(init=0);
declare @field: int Foo.i: @Anno(init=5);