aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612/xmldefs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs1612/xmldefs')
-rw-r--r--tests/bugs1612/xmldefs/A.java16
-rw-r--r--tests/bugs1612/xmldefs/C.java11
-rw-r--r--tests/bugs1612/xmldefs/ConcreteWorld.aj5
-rw-r--r--tests/bugs1612/xmldefs/Hello.java16
-rw-r--r--tests/bugs1612/xmldefs/Hello2.java16
-rw-r--r--tests/bugs1612/xmldefs/Hello3.classbin0 -> 802 bytes
-rw-r--r--tests/bugs1612/xmldefs/Hello3.java17
-rw-r--r--tests/bugs1612/xmldefs/JavaHelper.java40
-rw-r--r--tests/bugs1612/xmldefs/JavaHelper2.java8
-rw-r--r--tests/bugs1612/xmldefs/World.aj24
-rw-r--r--tests/bugs1612/xmldefs/WorldAt.java10
-rw-r--r--tests/bugs1612/xmldefs/aop.xml13
-rw-r--r--tests/bugs1612/xmldefs/aop10.xml14
-rw-r--r--tests/bugs1612/xmldefs/aop11.xml14
-rw-r--r--tests/bugs1612/xmldefs/aop12.xml14
-rw-r--r--tests/bugs1612/xmldefs/aop13.xml13
-rw-r--r--tests/bugs1612/xmldefs/aop2.xml13
-rw-r--r--tests/bugs1612/xmldefs/aop3.xml13
-rw-r--r--tests/bugs1612/xmldefs/aop4.xml13
-rw-r--r--tests/bugs1612/xmldefs/aop5.xml14
-rw-r--r--tests/bugs1612/xmldefs/aop6.xml15
-rw-r--r--tests/bugs1612/xmldefs/aop7.xml15
-rw-r--r--tests/bugs1612/xmldefs/aop8.xml15
-rw-r--r--tests/bugs1612/xmldefs/aop9.xml14
24 files changed, 343 insertions, 0 deletions
diff --git a/tests/bugs1612/xmldefs/A.java b/tests/bugs1612/xmldefs/A.java
new file mode 100644
index 000000000..fd94e0a30
--- /dev/null
+++ b/tests/bugs1612/xmldefs/A.java
@@ -0,0 +1,16 @@
+import org.aspectj.lang.annotation.*;
+
+ abstract aspect X {
+ void around(): execution(* foo(..)) {}
+}
+
+
+@Aspect class B extends X { }
+
+public class A {
+ public void foo() { }
+
+public static void main(String []argv) {
+ new A().foo();
+}
+}
diff --git a/tests/bugs1612/xmldefs/C.java b/tests/bugs1612/xmldefs/C.java
new file mode 100644
index 000000000..4028ee27a
--- /dev/null
+++ b/tests/bugs1612/xmldefs/C.java
@@ -0,0 +1,11 @@
+import org.aspectj.lang.annotation.*;
+import org.aspectj.lang.*;
+
+@Aspect
+public class C {
+ @Around("execution(* say2(..)) && args(w)")
+ public int m(ProceedingJoinPoint pjp,String w) {
+ pjp.proceed(new Object[]{"abc"});
+ return 1;
+ }
+}
diff --git a/tests/bugs1612/xmldefs/ConcreteWorld.aj b/tests/bugs1612/xmldefs/ConcreteWorld.aj
new file mode 100644
index 000000000..cb1716509
--- /dev/null
+++ b/tests/bugs1612/xmldefs/ConcreteWorld.aj
@@ -0,0 +1,5 @@
+public aspect ConcreteWorld extends World {
+ pointcut greeting() :
+ execution(* Hello.sayWorld(..))
+ || execution(* Hello.sayHello(..));
+}
diff --git a/tests/bugs1612/xmldefs/Hello.java b/tests/bugs1612/xmldefs/Hello.java
new file mode 100644
index 000000000..833ee1d3e
--- /dev/null
+++ b/tests/bugs1612/xmldefs/Hello.java
@@ -0,0 +1,16 @@
+public class Hello {
+
+ public static void main(String[] args) {
+ sayHello();
+ }
+
+ public static void sayHello() {
+ System.out.println("Hello");
+ sayWorld();
+ }
+
+ public static int sayWorld() {
+ System.out.println("World");
+ return 0;
+ }
+}
diff --git a/tests/bugs1612/xmldefs/Hello2.java b/tests/bugs1612/xmldefs/Hello2.java
new file mode 100644
index 000000000..92b4dd834
--- /dev/null
+++ b/tests/bugs1612/xmldefs/Hello2.java
@@ -0,0 +1,16 @@
+public class Hello2 {
+
+ public static void main(String[] args) {
+ say1("hello");
+ }
+
+ public static void say1(String h) {
+ System.out.println(h);
+ say2("world");
+ }
+
+ public static int say2(String w) {
+ System.out.println(w);
+ return 0;
+ }
+}
diff --git a/tests/bugs1612/xmldefs/Hello3.class b/tests/bugs1612/xmldefs/Hello3.class
new file mode 100644
index 000000000..543f998d1
--- /dev/null
+++ b/tests/bugs1612/xmldefs/Hello3.class
Binary files differ
diff --git a/tests/bugs1612/xmldefs/Hello3.java b/tests/bugs1612/xmldefs/Hello3.java
new file mode 100644
index 000000000..8f5190ec0
--- /dev/null
+++ b/tests/bugs1612/xmldefs/Hello3.java
@@ -0,0 +1,17 @@
+public class Hello3 {
+
+ public static void main(String[] args) {
+ say1("hello");
+ }
+
+ public static void say1(String h) {
+ System.out.println(h);
+ String s = say2("world");
+ System.out.println("from say2="+s);
+ }
+
+ public static String say2(String w) {
+ System.out.println(w);
+ return "";
+ }
+}
diff --git a/tests/bugs1612/xmldefs/JavaHelper.java b/tests/bugs1612/xmldefs/JavaHelper.java
new file mode 100644
index 000000000..3dee77d8b
--- /dev/null
+++ b/tests/bugs1612/xmldefs/JavaHelper.java
@@ -0,0 +1,40 @@
+public class JavaHelper {
+ public static void advice1() {
+ System.out.println("in advice");
+ }
+ public static void advice2(String s) {
+ System.out.println("in advice: s="+s);
+ }
+ public static void advice3(String s) {
+ System.out.println("in advice3: s="+s);
+ }
+ public static void advice4(org.aspectj.lang.JoinPoint tjp, String s) {
+ System.out.println("in advice4: s="+s+" at "+tjp);
+ }
+ public static void advice5(org.aspectj.lang.JoinPoint tjp, String s) {
+ System.out.println("in advice5: s="+s+" at "+tjp);
+ }
+ public static void advice6(org.aspectj.lang.JoinPoint.StaticPart tjp, String s) {
+ System.out.println("in advice6: s="+s+" at "+tjp);
+ }
+ public static void advice7(org.aspectj.lang.JoinPoint.StaticPart tjp, String s) {
+ System.out.println("in advice7: s="+s+" at "+tjp);
+ }
+ public static void around1(org.aspectj.lang.JoinPoint.StaticPart tjp, String s) {
+ System.out.println("in around advice: s="+s+" at "+tjp);
+ }
+ public static int around2(org.aspectj.lang.JoinPoint.StaticPart tjp, String s) {
+ System.out.println("in around2 advice: s="+s+" at "+tjp);
+ return 99;
+ }
+ public static int around3(org.aspectj.lang.ProceedingJoinPoint pjp, String s) {
+ pjp.proceed(new Object[]{"abcde"});
+ return 42;
+ }
+ public static String around4(org.aspectj.lang.ProceedingJoinPoint pjp, String s) {
+ System.out.println("around4 running");
+ pjp.proceed(new Object[]{"abcde"});
+ return "xyz";
+ }
+}
+
diff --git a/tests/bugs1612/xmldefs/JavaHelper2.java b/tests/bugs1612/xmldefs/JavaHelper2.java
new file mode 100644
index 000000000..7e2b10d2f
--- /dev/null
+++ b/tests/bugs1612/xmldefs/JavaHelper2.java
@@ -0,0 +1,8 @@
+package a.bb.ccc;
+
+public class JavaHelper2 {
+ public static void advice1() {
+ System.out.println("in advice");
+ }
+}
+
diff --git a/tests/bugs1612/xmldefs/World.aj b/tests/bugs1612/xmldefs/World.aj
new file mode 100644
index 000000000..ac3fd5cc6
--- /dev/null
+++ b/tests/bugs1612/xmldefs/World.aj
@@ -0,0 +1,24 @@
+import org.aspectj.lang.Signature;
+import org.aspectj.lang.JoinPoint;
+public abstract aspect World {
+ //private Object result;
+ pointcut greeting() : execution(* Hello.sayWorld(..));
+
+ Object around(): greeting() {
+ System.out.println("around start!");
+ Object result = proceed();
+ System.out.println("around end!");
+ return result;
+ }
+
+// before() : greeting() {
+// Signature signature = thisJoinPoint.getSignature();
+// System.out.println("before " + signature.getName());
+// }
+
+// after() returning () : greeting() {
+// Signature signature = thisJoinPoint.getSignature();
+// System.out.println("after " + signature.getName());
+// }
+
+}
diff --git a/tests/bugs1612/xmldefs/WorldAt.java b/tests/bugs1612/xmldefs/WorldAt.java
new file mode 100644
index 000000000..1d142de59
--- /dev/null
+++ b/tests/bugs1612/xmldefs/WorldAt.java
@@ -0,0 +1,10 @@
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
+@Aspect
+public abstract class WorldAt {
+
+ @Pointcut("execution(* Hello.sayWorld(..))")
+ void greeting() {}
+
+}
diff --git a/tests/bugs1612/xmldefs/aop.xml b/tests/bugs1612/xmldefs/aop.xml
new file mode 100644
index 000000000..76b8da9e1
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <before pointcut="execution(* Hello.sayWorld(..))" invokeClass="JavaHelper" invokeMethod="advice1()"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop10.xml b/tests/bugs1612/xmldefs/aop10.xml
new file mode 100644
index 000000000..c6f90bcd2
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop10.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <around pointcut="execution(* Hello2.say2(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="around2(JoinPoint.StaticPart pjp, java.lang.String w)"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello2"/>
+ <dump within="*"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop11.xml b/tests/bugs1612/xmldefs/aop11.xml
new file mode 100644
index 000000000..fa9b0aa82
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop11.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <around pointcut="execution(* Hello2.say2(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="around3(ProceedingJoinPoint pjp, java.lang.String w)"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello2"/>
+ <dump within="*"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop12.xml b/tests/bugs1612/xmldefs/aop12.xml
new file mode 100644
index 000000000..89c58f7f5
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop12.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <around pointcut="execution(* Hello3.say2(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="around4(ProceedingJoinPoint pjp, java.lang.String w)"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello3"/>
+ <dump within="*"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop13.xml b/tests/bugs1612/xmldefs/aop13.xml
new file mode 100644
index 000000000..98ef2783e
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop13.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <before pointcut="execution(* Hello2.say*(..))" invokeClass="a.bb.ccc.JavaHelper2" invokeMethod="advice1()"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello2"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop2.xml b/tests/bugs1612/xmldefs/aop2.xml
new file mode 100644
index 000000000..5dfab3cb8
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop2.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <before pointcut="execution(* Hello.sayWorld(..))" invokeClass="com.DoesNotExist" invokeMethod="advice1()"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop3.xml b/tests/bugs1612/xmldefs/aop3.xml
new file mode 100644
index 000000000..3a9a65e39
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop3.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <before pointcut="execution(* Hello.sayWorld(..))" invokeClass="JavaHelper" invokeMethod="advice1(String)"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop4.xml b/tests/bugs1612/xmldefs/aop4.xml
new file mode 100644
index 000000000..80f30d081
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop4.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <before pointcut="execution(* Hello.sayWorld(..))" invokeClass="JavaHelper" invokeMethod="advice1(java.lang.String:List)"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop5.xml b/tests/bugs1612/xmldefs/aop5.xml
new file mode 100644
index 000000000..655bd5578
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop5.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <before pointcut="execution(* Hello2.say2(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="advice2(java.lang.String w)"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello2"/>
+ <dump within="*"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop6.xml b/tests/bugs1612/xmldefs/aop6.xml
new file mode 100644
index 000000000..870767464
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop6.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <before pointcut="execution(* Hello2.say2(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="advice2(java.lang.String w)"/>
+ <after pointcut="execution(* Hello2.say2(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="advice3(java.lang.String w)"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello2"/>
+ <dump within="*"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop7.xml b/tests/bugs1612/xmldefs/aop7.xml
new file mode 100644
index 000000000..7d1852d5e
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop7.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <before pointcut="execution(* Hello2.say2(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="advice4(JoinPoint tjp, java.lang.String w)"/>
+ <after pointcut="execution(* Hello2.say2(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="advice5(JoinPoint tjp, java.lang.String w)"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello2"/>
+ <dump within="*"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop8.xml b/tests/bugs1612/xmldefs/aop8.xml
new file mode 100644
index 000000000..890bfc5e1
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop8.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <before pointcut="execution(* Hello2.say2(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="advice6(JoinPoint.StaticPart tjpsp, java.lang.String w)"/>
+ <after pointcut="execution(* Hello2.say2(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="advice7(JoinPoint.StaticPart tjpsp, java.lang.String w)"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello2"/>
+ <dump within="*"/>
+ </weaver>
+</aspectj>
+
diff --git a/tests/bugs1612/xmldefs/aop9.xml b/tests/bugs1612/xmldefs/aop9.xml
new file mode 100644
index 000000000..6ec4af59b
--- /dev/null
+++ b/tests/bugs1612/xmldefs/aop9.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aspectj>
+ <aspects>
+ <concrete-aspect name="ConjuredUp">
+ <around pointcut="execution(* Hello2.say1(..)) AND args(w) " invokeClass="JavaHelper" invokeMethod="around1(JoinPoint.StaticPart tjpsp, java.lang.String w)"/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-Xreweavable -verbose -XlazyTjp -showWeaveInfo">
+ <include within="Hello2"/>
+ <dump within="*"/>
+ </weaver>
+</aspectj>
+