[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] pertypewithin and getWithinType(Name)
|
Hi all,
I'm developing an aspect with an advice requiring fast access to a list
of methods of a class with a certain annotation. The purpose of the
advice is to call these methods in sequence using reflection. In order
to speed things up (or maybe not!), I thought that using the
pertypewithin instantiation model might be a good idea. Each instance of
the aspect would have a list containing the methods belonging to the
associated type and annotated with the required annotation. I order to
avoid using both tests (for lazy insertion of the methods into the list)
and reflection during advice execution, it would be nice to be able to
use the aspect constructor to insert the methods into list. Hence, I
would like to somehow get the class with which the aspect being
constructed is associated. As far as I understood from the discussion in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=123423, the closest thing
to what I need is getWithinTypeName(), which furthermore is only
available for annotation style aspects. Am I right? Does my case apply
to Andy's comment that he "[...] will do the Aspects work if someone
needs it"? ;-) Or is there some workaround I'm not aware of?
Thanks in advance,
Manuel
begin:vcard
fn:Manuel Menezes de Sequeira
n:Menezes de Sequeira;Manuel
org:ISCTE;CI
adr;quoted-printable:;;Av. das For=C3=A7as Armadas;Lisboa;;1649-026;Portugal
email;internet:Manuel.Sequeira@xxxxxxxx
title;quoted-printable:Director de Servi=C3=A7os
tel;work:+351 217903085
tel;fax:+351 217903927
tel;cell:+351 962337428
x-mozilla-html:TRUE
url:http://ci.iscte.pt/
version:2.1
end:vcard
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature