[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] Question about constructor pointcuts
|
- From: "Eric Bodden" <eric.bodden@xxxxxxxxxxxxxx>
- Date: Tue, 25 Nov 2008 10:50:11 -0500
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=wU0O7ge5034qEaqduUpEuBOEqmj0i7wrfu92en4+Ros=; b=r736zD8e6AdcNZJfZYVgFz8531Ky5EhFsI3fxVEOUBcqZrm2Rgi9j4POxPxvQEqqa0 4dckmaaXj44lpaZIZ7sKwT8x6DmYs4DAYZ8QpUJnK8Iu7IRfKH52w7/DWtR8Ai8S2JGx HI0cz76vjG9B4VcE6wyk0t7iGbTqoQl3+7k/o=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=kHt61wWyQwBYhgFRwc5vCohcdJXa2puVbFpxx+i2vIOhPkXmxfwNKoemLIZmdwBJ3c Ps4sDKiN1HSbnXPqIGEj0nCDEZ+Q6SJTbs8uW+uyiHU8t704NZlYiaRt+4l97UY3+nQU JSRMkUijicTxmjLEmVdC7y0gXbv2+/dMEZfhU=
> 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/