aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5
diff options
context:
space:
mode:
Diffstat (limited to 'tests/java5')
-rw-r--r--tests/java5/annotations/binding/AdviceExecBinding.aj43
-rw-r--r--tests/java5/annotations/binding/CtorAnnBinding1.aj41
-rw-r--r--tests/java5/annotations/binding/CtorAnnBinding2.aj41
-rw-r--r--tests/java5/annotations/binding/FieldAnnBinding1.aj39
-rw-r--r--tests/java5/annotations/binding/FieldAnnBinding2.aj43
-rw-r--r--tests/java5/annotations/binding/FieldAnnBinding3.aj39
-rw-r--r--tests/java5/annotations/binding/HandlerBinding.aj40
-rw-r--r--tests/java5/annotations/binding/InitBinding.aj42
-rw-r--r--tests/java5/annotations/binding/PreInitBinding.aj43
-rw-r--r--tests/java5/annotations/binding/StaticInitBinding.aj37
10 files changed, 408 insertions, 0 deletions
diff --git a/tests/java5/annotations/binding/AdviceExecBinding.aj b/tests/java5/annotations/binding/AdviceExecBinding.aj
new file mode 100644
index 000000000..6771928ef
--- /dev/null
+++ b/tests/java5/annotations/binding/AdviceExecBinding.aj
@@ -0,0 +1,43 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Colored { String color(); }
+
+public class AdviceExecBinding {
+ public static void main(String[]argv) {
+ m1();
+ m2();
+ m3();
+ X.verifyRun();
+ }
+
+ static void m1() {}
+ static void m2() {}
+ static void m3() {}
+}
+
+aspect B {
+ @Colored(color="orange") before(): execution(* m1()) {}
+ @Colored(color="yellow") before(): execution(* m2()) {}
+ @Colored(color="brown") before(): execution(* m3()) {}
+}
+
+aspect X {
+
+ // Expected color order
+ static String exp[] = new String[]{"orange","yellow","brown"};
+
+ static int i = 0; // Count of advice executions
+
+ before(Colored c): adviceexecution() && within(B) && @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);
+ }
+}
+
diff --git a/tests/java5/annotations/binding/CtorAnnBinding1.aj b/tests/java5/annotations/binding/CtorAnnBinding1.aj
new file mode 100644
index 000000000..613af3b21
--- /dev/null
+++ b/tests/java5/annotations/binding/CtorAnnBinding1.aj
@@ -0,0 +1,41 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Colored { String color(); }
+
+public class CtorAnnBinding1 {
+ public static void main(String[]argv) {
+ new C();
+ new C("hello");
+ new C(new int[]{1,2,3});
+ X.verifyRun();
+ }
+
+ static class C {
+
+ @Colored(color="red") public C() {System.err.println("<init>() running");}
+ @Colored(color="green") public C(String s) {System.err.println("<init>("+s+") running");}
+ @Colored(color="blue") public C(int[] is) {System.err.println("<init>(int[]) running");}
+ public C(boolean b) {System.err.println("<init>("+b+") running");}
+ }
+
+}
+
+aspect X {
+
+ // Expected color order
+ static String exp[] = new String[]{"red","green","blue"};
+
+ static int i = 0; // Count of advice executions
+
+ before(Colored c): call(new(..)) && 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);
+ }
+} \ No newline at end of file
diff --git a/tests/java5/annotations/binding/CtorAnnBinding2.aj b/tests/java5/annotations/binding/CtorAnnBinding2.aj
new file mode 100644
index 000000000..f67e87458
--- /dev/null
+++ b/tests/java5/annotations/binding/CtorAnnBinding2.aj
@@ -0,0 +1,41 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Colored { String color(); }
+
+public class CtorAnnBinding2 {
+ public static void main(String[]argv) {
+ new C();
+ new C("hello");
+ new C(new int[]{1,2,3});
+ X.verifyRun();
+ }
+
+ static class C {
+
+ @Colored(color="red") public C() {System.err.println("<init>() running");}
+ @Colored(color="green") public C(String s) {System.err.println("<init>("+s+") running");}
+ @Colored(color="blue") public C(int[] is) {System.err.println("<init>(int[]) running");}
+ public C(boolean b) {System.err.println("<init>("+b+") running");}
+ }
+
+}
+
+aspect X {
+
+ // Expected color order
+ static String exp[] = new String[]{"red","green","blue"};
+
+ static int i = 0; // Count of advice executions
+
+ before(Colored c): execution(new(..)) && within(CtorAnnBinding2) && @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);
+ }
+} \ No newline at end of file
diff --git a/tests/java5/annotations/binding/FieldAnnBinding1.aj b/tests/java5/annotations/binding/FieldAnnBinding1.aj
new file mode 100644
index 000000000..68f8c3313
--- /dev/null
+++ b/tests/java5/annotations/binding/FieldAnnBinding1.aj
@@ -0,0 +1,39 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Colored { String color();}
+
+public class FieldAnnBinding1 {
+
+ @Colored(color="red") static int i;
+
+ @Colored(color="blue") String s;
+
+ @Colored(color="green") boolean b;
+
+ public static void main(String[]argv) {
+ i = 5;
+ new FieldAnnBinding1().s = "abc";
+ new FieldAnnBinding1().b = true;
+ X.verifyRun();
+ }
+}
+
+aspect X {
+
+ // Expected color order
+ static String exp[] = new String[]{"red","blue","green"};
+
+ static int i = 0; // Count of advice executions
+
+ before(Colored c): set(* *) && 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);
+ }
+}
diff --git a/tests/java5/annotations/binding/FieldAnnBinding2.aj b/tests/java5/annotations/binding/FieldAnnBinding2.aj
new file mode 100644
index 000000000..5c52594ca
--- /dev/null
+++ b/tests/java5/annotations/binding/FieldAnnBinding2.aj
@@ -0,0 +1,43 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Colored { String color();}
+
+public class FieldAnnBinding2 {
+
+ @Colored(color="red") static int i;
+
+ @Colored(color="blue") String s;
+
+ @Colored(color="green") boolean b;
+
+ public static void main(String[]argv) {
+ FieldAnnBinding2 fab = new FieldAnnBinding2();
+ i = 5;
+ fab.s = "abc";
+ fab.b = true;
+
+ System.err.println("i="+fab.i);
+ 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","green"};
+
+ 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);
+ }
+}
diff --git a/tests/java5/annotations/binding/FieldAnnBinding3.aj b/tests/java5/annotations/binding/FieldAnnBinding3.aj
new file mode 100644
index 000000000..a6ccb683c
--- /dev/null
+++ b/tests/java5/annotations/binding/FieldAnnBinding3.aj
@@ -0,0 +1,39 @@
+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);
+ }
+} \ No newline at end of file
diff --git a/tests/java5/annotations/binding/HandlerBinding.aj b/tests/java5/annotations/binding/HandlerBinding.aj
new file mode 100644
index 000000000..fc2d0d3c4
--- /dev/null
+++ b/tests/java5/annotations/binding/HandlerBinding.aj
@@ -0,0 +1,40 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Colored { String color(); }
+
+public class HandlerBinding {
+ public static void main(String[]argv) {
+ try {
+ throw new AndyException();
+ } catch (AndyException ae) {
+ System.err.println(ae);
+ }
+ X.verifyRun();
+ }
+
+ @Colored(color="red") static class AndyException extends Exception {
+ public AndyException() {
+ }
+ }
+
+}
+
+aspect X {
+
+ // Expected color order
+ static String exp[] = new String[]{"red"};
+
+ static int i = 0; // Count of advice executions
+
+ before(Colored c): handler(*) && !within(X) && @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);
+ }
+ }
diff --git a/tests/java5/annotations/binding/InitBinding.aj b/tests/java5/annotations/binding/InitBinding.aj
new file mode 100644
index 000000000..87e8caca4
--- /dev/null
+++ b/tests/java5/annotations/binding/InitBinding.aj
@@ -0,0 +1,42 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Colored { String color(); }
+
+public class InitBinding {
+ public static void main(String[]argv) {
+ new A();
+ new B();
+ new C();
+ X.verifyRun();
+ }
+}
+
+class A {
+@Colored(color="orange") public A() {}
+}
+class B {
+@Colored(color="yellow") public B() {}
+}
+class C {
+@Colored(color="brown") public C() {}
+}
+
+aspect X {
+
+ // Expected color order
+ static String exp[] = new String[]{"orange","yellow","brown"};
+
+ static int i = 0; // Count of advice executions
+
+ before(Colored c): preinitialization(new(..)) && !within(X) && @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);
+ }
+ }
diff --git a/tests/java5/annotations/binding/PreInitBinding.aj b/tests/java5/annotations/binding/PreInitBinding.aj
new file mode 100644
index 000000000..92c6d1aea
--- /dev/null
+++ b/tests/java5/annotations/binding/PreInitBinding.aj
@@ -0,0 +1,43 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Colored { String color(); }
+
+public class PreInitBinding {
+ public static void main(String[]argv) {
+ new A();
+ new B();
+ new C();
+ X.verifyRun();
+ }
+}
+
+class A {
+@Colored(color="orange") public A() {}
+}
+class B {
+@Colored(color="yellow") public B() {}
+}
+class C {
+@Colored(color="brown") public C() {}
+}
+
+
+aspect X {
+
+ // Expected color order
+ static String exp[] = new String[]{"orange","yellow","brown"};
+
+ static int i = 0; // Count of advice executions
+
+ before(Colored c): preinitialization(new(..)) && !within(X) && @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);
+ }
+ }
diff --git a/tests/java5/annotations/binding/StaticInitBinding.aj b/tests/java5/annotations/binding/StaticInitBinding.aj
new file mode 100644
index 000000000..7473dafe3
--- /dev/null
+++ b/tests/java5/annotations/binding/StaticInitBinding.aj
@@ -0,0 +1,37 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Colored { String color(); }
+
+public class StaticInitBinding {
+ public static void main(String[]argv) {
+ new A();
+ new B();
+ new C();
+ X.verifyRun();
+ }
+}
+
+@Colored(color="orange") class A {}
+@Colored(color="yellow") class B {}
+@Colored(color="brown") class C {}
+
+
+aspect X {
+
+ // Expected color order
+ static String exp[] = new String[]{"orange","yellow","brown"};
+
+ static int i = 0; // Count of advice executions
+
+ before(Colored c): staticinitialization(*) && !within(X) && @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);
+ }
+} \ No newline at end of file
788/stable27 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/core/l10n/es_MX.js
blob: ff62433d61738eae2e642d3c2975b09fe26c2f6c (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145