[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] How to use JAVA5 Annotations
|
Hi,
I'm working on an aspect using JAVA5 Annotations but can't seem to make the weaver understand what annotations are...
(I'm using J2RE1.5 and aspectj1.5)
I'm getting trouble on three code snippets:
1) On the following pointcut:
public pointcut setAsGet() : within(@Inspector *) && set(private * *.*);
...the weaver says: [error] Type referred to is not an annotation type: pp.Inspector
2) on the Annotation definition:
package pp;
public @interface Inspector
{
}
...the weaver says:
[error] Syntax error on token "AT", delete this token public @interface Constructor
3) and when I use the Annotation:
@Inspector
public int getField()
{
return field_;
}
...the weaver says:
[error] Syntax error on token "AT", invalid AspectHeaderName
@Inspector
Now, what am I doing wrong? This is just a simple-as-hell aspect and I can't seem to make it work right or to figure why the weaver can't understand what I coded.
Also, I'm using the Annotation definition in a .java file, the aspect in a .aj file and the the class that makes use of the Annotation in another .java file.
Thank you very much
Rodrigo
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador do Yahoo! agora.