blob: b22ebcf81e6b1d83c6032c92c2836cb2a0135c9f (
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
37
38
39
40
41
|
// nested values, more complex than just a marker
import java.lang.annotation.*;
aspect X {
declare parents: @Bar(value = "123") * implements java.io.Serializable;
}
@Bar(value="123")
@NamedQuery(name = "Department.findAll",query = "select d from Department d order by d.name ASC",hints = {@QueryHint(name = "org.hibernate.cacheable",value = "true")})
public class Example2 {
public static void main(String []argv) {
Example2 e = new Example2();
if (e instanceof java.io.Serializable) {
System.out.println("yes");
} else {
System.out.println("no");
}
}
}
@Retention(RetentionPolicy.RUNTIME)
@interface QueryHint {
String name();
String value();
}
@Retention(RetentionPolicy.RUNTIME)
@interface NamedQuery {
String name();
String query();
QueryHint[] hints();
}
@Retention(RetentionPolicy.RUNTIME)
@interface Bar {
String value();
}
|