[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[aspectj-users] Is @DeclareParents the only way to make inter-type field declaration in @AspectJ notation
|
- From: João Gonçalves <jocolimonada@xxxxxxxxx>
- Date: Mon, 31 Aug 2009 14:51:47 +0100
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=f8CLDwlE1S49GDKZCWFGjlTKZEHtJpPO9LGKwmxUmHg=; b=mVF0yzD6ldZL4gZXa5Dvol3b9W0IJ9sXDfQblFKZhdyoboW78Emmn/vF74M23Fy9kC eEm9T+pX/uIaE9OWb1Nal0KpdkT+ma0JTrSpSQYXKsJXaiLt+GF/VCY05mX8ZfqTK/IM YzaWY5yhySqYM4EEYv+acuQ7cc5EAORlJK6mU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=vYRVP8gRGV/EUMR0n8Q9FJF1sQBKnu8RtHKJknucrfkemmD69+NUzC0ISx//crDMDa 5+nkaNfRV7sDAXSYTJAsPlzwYFHiWKweQc9+CDRHv6JW5zWS4Ltb8ltqKvDXXgmcpFau m0/KF/KSAvG4gciVrFO5/iX/syD0utlz4XKPk=
Greetings, I have a small doubt.
In AspectJ's "traditional" notation, it is possible to declare a new field for a type this way:
public aspect A {
private FieldType TargetType.field = <something>;
}
In @AspectJ notation do I have to create an interface (mixin) that has that field and use @DeclareParents/@DeclareMixin to make all instances of the type TargetType have that field.
Is there a simpler way?
Thanks