[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Question about constructor pointcuts

> Does the advice run before the constructor has finished, thus exposing
> this in a non-threadsafe manner?

AFAIK it doesn't. Your code will run just at the end of the
constructor (inside it).

> What is a better way to write this advice such that something happens
> after the constructor has completed?

after() returning(Listener l): call((@MyAnnotation *).new(..)) {
..
}

Eric

-- 
Eric Bodden
Sable Research Group, McGill University, Montréal, Canada
Got an interesting job offer? http://www.bodden.de/hire-me/