Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Unsubscribe

 


From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Diego Torres
Sent: Wednesday, February 28, 2007 7:45 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] Problems with annotation

Hi all,
I have a problem. I' ve defined a java class, an annotation and an Aspectj. I want to obtain all calls to method test with a class that reference an AnnotationTest annotation. The following code is mine, but it doesn't work.
Anybody could help me?

Thanks

Diego

public class Test{
...
public void test(Test t){}
}

public class SubTest extends Test{}

public @interface AnnotationTest{}

public aspect AspectTest{

declare @type:SubTest:@AnnotationTest;

pointcut overTest():call(* Test.test(..)) && @args(AnnotationTest);

after():overTest(){
   //do something

}

}

--
Diego Torres
LIFIA - Laboratorio de Investigación y Formación en Informática Avanzada
Facultad de Informática - Universidad Nacional de La Plata
Calles 50 y 115 La Plata - 1900 Argentina
Phone: +54 221 4228252 Ext: 220
e-mail: diego.torres@xxxxxxxxxxxxxxxxxxxxxx

Back to the top