blob: c36e2f42bd3d08fc9760cb28c6f0c3b57a5b88e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
import java.lang.annotation.*;
public class Error {
public static void main(String[] args) { }
}
@interface Anno {
int ival();
float fval();
double dval();
byte bval();
short sval();
boolean zval();
long jval();
Color enumval();
char cval();
String stringval();
}
enum Color { RED,GREEN,BLUE };
aspect X {
before(): execution(@Anno(ival=Color.GREEN) * *(..)) {}
before(): execution(@Anno(fval="hello") * *(..)) {} // invalid
before(): execution(@Anno(bval="foo") * *(..)) {}
before(): execution(@Anno(cval="no") * *(..)) {}
before(): execution(@Anno(jval=30.0f) * *(..)) {}
before(): execution(@Anno(dval="foo") * *(..)) {}
before(): execution(@Anno(zval=123) * *(..)) {}
before(): execution(@Anno(sval=4212312312) * *(..)) {}
before(): execution(@Anno(enumval=12) * *(..)) {}
before(): execution(@Anno(stringval=234) * *(..)) {}
// before(): execution(@Anno(clazzval=String.class) * *(..));
// before(): execution(@Anno(arrayval={1,2,3}) * *(..));
}
|