aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features167
diff options
context:
space:
mode:
authoraclement <aclement>2009-10-31 17:14:35 +0000
committeraclement <aclement>2009-10-31 17:14:35 +0000
commit657bba8c14a09313dddecf3a37f38cb33aec72a6 (patch)
tree3e4c3c51ae3a6fad2fd558451ff1af7c14e970b5 /tests/features167
parentfb90e0701976ec104659a4903e218861196d7ce9 (diff)
downloadaspectj-657bba8c14a09313dddecf3a37f38cb33aec72a6.tar.gz
aspectj-657bba8c14a09313dddecf3a37f38cb33aec72a6.zip
overweaving: testcode
Diffstat (limited to 'tests/features167')
-rw-r--r--tests/features167/overweaving/A.aj12
-rw-r--r--tests/features167/overweaving/C.java13
-rw-r--r--tests/features167/overweaving/X.aj6
-rw-r--r--tests/features167/overweaving/aop.xml9
-rw-r--r--tests/features167/overweaving/cflow/A.aj16
-rw-r--r--tests/features167/overweaving/cflow/C.java13
-rw-r--r--tests/features167/overweaving/cflow/X.aj7
-rw-r--r--tests/features167/overweaving/cflow/aop.xml10
-rw-r--r--tests/features167/overweaving/messy/A.aj16
-rw-r--r--tests/features167/overweaving/messy/C.java13
-rw-r--r--tests/features167/overweaving/messy/X.aj6
-rw-r--r--tests/features167/overweaving/messy/aop.xml10
12 files changed, 131 insertions, 0 deletions
diff --git a/tests/features167/overweaving/A.aj b/tests/features167/overweaving/A.aj
new file mode 100644
index 000000000..fc9cc0fb5
--- /dev/null
+++ b/tests/features167/overweaving/A.aj
@@ -0,0 +1,12 @@
+package com.andy;
+
+@interface Anno {}
+
+aspect A {
+ declare @type: com.andy.C: @Anno;
+
+ before(): execution(* C.main(..)) {
+ System.out.println("AspectA>>"+thisJoinPointStaticPart);
+ }
+
+}
diff --git a/tests/features167/overweaving/C.java b/tests/features167/overweaving/C.java
new file mode 100644
index 000000000..8c760bb60
--- /dev/null
+++ b/tests/features167/overweaving/C.java
@@ -0,0 +1,13 @@
+package com.andy;
+
+public class C {
+ public String name = "andy";
+
+ public static void main(String []argv) {
+ new C().run();
+ }
+
+ public void run() {
+ System.out.println("hello "+name);
+ }
+}
diff --git a/tests/features167/overweaving/X.aj b/tests/features167/overweaving/X.aj
new file mode 100644
index 000000000..8c51d6072
--- /dev/null
+++ b/tests/features167/overweaving/X.aj
@@ -0,0 +1,6 @@
+aspect X {
+before(): execution(* *(..)) {
+ System.out.println("AspectX>>"+thisJoinPointStaticPart);
+}
+}
+
diff --git a/tests/features167/overweaving/aop.xml b/tests/features167/overweaving/aop.xml
new file mode 100644
index 000000000..957cc2c32
--- /dev/null
+++ b/tests/features167/overweaving/aop.xml
@@ -0,0 +1,9 @@
+<aspectj>
+<aspects>
+ <aspect name="X"/>
+</aspects>
+<weaver options="-verbose -Xset:overWeaving=true">
+ <dump within="*" beforeandafter="true"/>
+</weaver>
+
+</aspectj>
diff --git a/tests/features167/overweaving/cflow/A.aj b/tests/features167/overweaving/cflow/A.aj
new file mode 100644
index 000000000..961f489c1
--- /dev/null
+++ b/tests/features167/overweaving/cflow/A.aj
@@ -0,0 +1,16 @@
+package com.andy;
+
+@interface Anno {}
+
+aspect A {
+ declare @type: com.andy.C: @Anno;
+
+ int C.i = 5;
+
+ public void C.m() {}
+
+ before(): execution(* C.main(..)) {
+ System.out.println("AspectA>>"+thisJoinPointStaticPart);
+ }
+
+}
diff --git a/tests/features167/overweaving/cflow/C.java b/tests/features167/overweaving/cflow/C.java
new file mode 100644
index 000000000..8c760bb60
--- /dev/null
+++ b/tests/features167/overweaving/cflow/C.java
@@ -0,0 +1,13 @@
+package com.andy;
+
+public class C {
+ public String name = "andy";
+
+ public static void main(String []argv) {
+ new C().run();
+ }
+
+ public void run() {
+ System.out.println("hello "+name);
+ }
+}
diff --git a/tests/features167/overweaving/cflow/X.aj b/tests/features167/overweaving/cflow/X.aj
new file mode 100644
index 000000000..e8fe7dfb0
--- /dev/null
+++ b/tests/features167/overweaving/cflow/X.aj
@@ -0,0 +1,7 @@
+aspect X {
+before(): cflow(execution(* main(..))) && execution(* *(..)) {
+ System.out.println("AspectX>>"+thisJoinPointStaticPart);
+}
+
+}
+
diff --git a/tests/features167/overweaving/cflow/aop.xml b/tests/features167/overweaving/cflow/aop.xml
new file mode 100644
index 000000000..b199c94ea
--- /dev/null
+++ b/tests/features167/overweaving/cflow/aop.xml
@@ -0,0 +1,10 @@
+<aspectj>
+<aspects>
+ <aspect name="X"/>
+ <aspect name="com.andy.A"/>
+</aspects>
+<weaver options="-verbose -Xset:overWeaving=true">
+ <dump within="*" beforeandafter="true"/>
+</weaver>
+
+</aspectj>
diff --git a/tests/features167/overweaving/messy/A.aj b/tests/features167/overweaving/messy/A.aj
new file mode 100644
index 000000000..961f489c1
--- /dev/null
+++ b/tests/features167/overweaving/messy/A.aj
@@ -0,0 +1,16 @@
+package com.andy;
+
+@interface Anno {}
+
+aspect A {
+ declare @type: com.andy.C: @Anno;
+
+ int C.i = 5;
+
+ public void C.m() {}
+
+ before(): execution(* C.main(..)) {
+ System.out.println("AspectA>>"+thisJoinPointStaticPart);
+ }
+
+}
diff --git a/tests/features167/overweaving/messy/C.java b/tests/features167/overweaving/messy/C.java
new file mode 100644
index 000000000..8c760bb60
--- /dev/null
+++ b/tests/features167/overweaving/messy/C.java
@@ -0,0 +1,13 @@
+package com.andy;
+
+public class C {
+ public String name = "andy";
+
+ public static void main(String []argv) {
+ new C().run();
+ }
+
+ public void run() {
+ System.out.println("hello "+name);
+ }
+}
diff --git a/tests/features167/overweaving/messy/X.aj b/tests/features167/overweaving/messy/X.aj
new file mode 100644
index 000000000..8c51d6072
--- /dev/null
+++ b/tests/features167/overweaving/messy/X.aj
@@ -0,0 +1,6 @@
+aspect X {
+before(): execution(* *(..)) {
+ System.out.println("AspectX>>"+thisJoinPointStaticPart);
+}
+}
+
diff --git a/tests/features167/overweaving/messy/aop.xml b/tests/features167/overweaving/messy/aop.xml
new file mode 100644
index 000000000..0f99ba166
--- /dev/null
+++ b/tests/features167/overweaving/messy/aop.xml
@@ -0,0 +1,10 @@
+<aspectj>
+<aspects>
+ <aspect name="X"/>
+ <aspect name="com.andy.A"/>
+</aspects>
+<weaver options="-verbose -Xset:overWeaving=true -debug">
+ <dump within="*" beforeandafter="true"/>
+</weaver>
+
+</aspectj>