blob: d92dc33b146ba243bda5245182973a0bb2e6bc1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package a;
@MethodAnnotation
public aspect AnnotatedAspect02 {
@TypeAnnotation int goo;
@FieldAnnotation int getGoo() { return goo; }
@AnnotationAnnotation AnnotatedAspect02() { goo = 5; }
}
aspect VerifyAnnotations {
declare warning : set(@FieldAnnotation * *) : "annotated field";
declare warning : execution(@MethodAnnotation * *(..)) : "annotated method";
declare warning : execution(@ConstructorAnnotation new(..)) : "annotated constructor";
declare warning : staticinitialization(@TypeAnnotation *) : "annotated type";
}
|