aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features167/overweaving/cflow
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features167/overweaving/cflow')
-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
4 files changed, 46 insertions, 0 deletions
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>