import java.lang.annotation.*; @Retention(RetentionPolicy.RUNTIME) @interface Colored { String color();} public class FieldAnnBinding3 { @Colored(color="red") String s[]; @Colored(color="blue") boolean b[]; public static void main(String[]argv) { FieldAnnBinding3 fab = new FieldAnnBinding3(); fab.s = new String[]{"abc","def"}; fab.b = new boolean[]{true,false,true}; System.err.println("s="+fab.s); System.err.println("b="+fab.b); X.verifyRun(); } } aspect X { // Expected color order static String exp[] = new String[]{"red","blue"}; static int i = 0; // Count of advice executions before(Colored c): get(* *) && withincode(* main(..)) && @annotation(c) { System.err.println(thisJoinPoint+" color="+c.color()); if (!c.color().equals(exp[i])) throw new RuntimeException("not "+exp[i]+"? "+c.color()); i++; } public static void verifyRun() { if (X.i != exp.length) throw new RuntimeException("Expected "+exp.length+" advice runs but did "+X.i); } }/json-schema'>3rdparty/justinrainbow/json-schema Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Http/DownloadResponseTest.php
blob: 89de248cea0cd08fa0d99016a2676c3904884111 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65