[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] One target for intertype declarations

Hi all,

I would just like to confirm something regarding the elimination of "multi-intertype declarations". Basically, I want to add a field to every object instance. So, perviously, I could have just used something like:

aspect A {
        public int *.theField = 0;
}

But, since AspectJ 1.1 this syntax is no more. So, now my question. Is the pertarget specifier supposed to be used instead of the above now? I realise that the README-11.html indicates pertype should be used for static field member introduction (if it existed, that is), so I figure the reasoning is the same.

Also, how is pertarget actually implemented? Does it involve some kind of hashmap lookup or not? If not, then what?

Any help would be appreciated!

David J. Pearce