aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs152/pr145963
diff options
context:
space:
mode:
authoraclement <aclement>2006-07-25 08:38:09 +0000
committeraclement <aclement>2006-07-25 08:38:09 +0000
commitd373429ee98f689574fb2657ef0739c58ed4e0b8 (patch)
tree0729f014ec4fed877032dd30c488fe0ec2e12dc7 /tests/bugs152/pr145963
parent357bbe9eeb34748f7c8c2ff85049230db2adbbf2 (diff)
downloadaspectj-d373429ee98f689574fb2657ef0739c58ed4e0b8.tar.gz
aspectj-d373429ee98f689574fb2657ef0739c58ed4e0b8.zip
test and fixes for Bug 145963: add injar aspects to the model
Diffstat (limited to 'tests/bugs152/pr145963')
-rw-r--r--tests/bugs152/pr145963/AbstractAspect.aj10
-rw-r--r--tests/bugs152/pr145963/AspectInDefaultPackage.aj18
-rw-r--r--tests/bugs152/pr145963/C.java12
-rw-r--r--tests/bugs152/pr145963/ConcreteAspect.aj17
-rw-r--r--tests/bugs152/pr145963/README.txt16
-rw-r--r--tests/bugs152/pr145963/SrcAspect.aj10
-rw-r--r--tests/bugs152/pr145963/adviceLabels.jarbin0 -> 1445 bytes
-rw-r--r--tests/bugs152/pr145963/aspectInDefaultPackage.jarbin0 -> 1473 bytes
8 files changed, 83 insertions, 0 deletions
diff --git a/tests/bugs152/pr145963/AbstractAspect.aj b/tests/bugs152/pr145963/AbstractAspect.aj
new file mode 100644
index 000000000..ed2b12170
--- /dev/null
+++ b/tests/bugs152/pr145963/AbstractAspect.aj
@@ -0,0 +1,10 @@
+package pkg;
+
+public abstract aspect AbstractAspect {
+
+ public abstract pointcut abstractPCD();
+
+ before() : abstractPCD() {
+ }
+
+}
diff --git a/tests/bugs152/pr145963/AspectInDefaultPackage.aj b/tests/bugs152/pr145963/AspectInDefaultPackage.aj
new file mode 100644
index 000000000..88d2e00a8
--- /dev/null
+++ b/tests/bugs152/pr145963/AspectInDefaultPackage.aj
@@ -0,0 +1,18 @@
+
+public aspect AspectInDefaultPackage {
+
+ public pointcut execM1() : execution(* pack.C.method1(..));
+ public pointcut execM2() : execution(* pack.C.method2(..));
+
+ before() : execM1() && this(pack.C) {
+ }
+
+ before() : execM2() || execM1() {
+ }
+
+ before() : execution(* pack.C.method1()) {
+ }
+
+
+
+}
diff --git a/tests/bugs152/pr145963/C.java b/tests/bugs152/pr145963/C.java
new file mode 100644
index 000000000..b255175c9
--- /dev/null
+++ b/tests/bugs152/pr145963/C.java
@@ -0,0 +1,12 @@
+package pack;
+
+public class C {
+
+ public void method1() {
+ new C().method2();
+ }
+
+ public void method2() {
+ }
+
+}
diff --git a/tests/bugs152/pr145963/ConcreteAspect.aj b/tests/bugs152/pr145963/ConcreteAspect.aj
new file mode 100644
index 000000000..4052180d3
--- /dev/null
+++ b/tests/bugs152/pr145963/ConcreteAspect.aj
@@ -0,0 +1,17 @@
+package pkg;
+
+public aspect ConcreteAspect {
+
+ public pointcut execM1() : execution(* pack.C.method1(..));
+ public pointcut execM2() : execution(* pack.C.method2(..));
+
+ before() : execM1() && this(pack.C) {
+ }
+
+ before() : execM2() || execM1() {
+ }
+
+ before() : execution(* pack.C.method1()) {
+ }
+
+}
diff --git a/tests/bugs152/pr145963/README.txt b/tests/bugs152/pr145963/README.txt
new file mode 100644
index 000000000..b039752bc
--- /dev/null
+++ b/tests/bugs152/pr145963/README.txt
@@ -0,0 +1,16 @@
+To recreate the jar files create AspectJ projects within Eclipse containing the
+required files, right click and select 'Export > Java > JAR file with AspectJ Support'
+
+jar file files contained in the jar file
+-------- -------------------------------
+adviceAndDeow.jar A.aj, Deow.aj, Itd.aj, NewClass.java
+adviceLabels.jar ConcreteAspect.aj
+aspectInDefaultPackage.jar AspectInDefaultPackage.aj
+
+
+
+may need classpath entries on some of these: ?
+
+ajc A.aj Deow.aj Itd.aj NewClass.java -outjar adviceAndDeow.jar
+ajc ConcreteAspect.aj -outjar adviceLabels.jar
+ajc AspectInDefaultPackage.aj -outjar aspectInDefaultPackage.jar \ No newline at end of file
diff --git a/tests/bugs152/pr145963/SrcAspect.aj b/tests/bugs152/pr145963/SrcAspect.aj
new file mode 100644
index 000000000..c10ed2698
--- /dev/null
+++ b/tests/bugs152/pr145963/SrcAspect.aj
@@ -0,0 +1,10 @@
+package pkg;
+
+public aspect SrcAspect {
+
+ pointcut p() : execution(* *.*(..)) && !within(pkg.*);
+
+ before() : p() {
+ }
+
+}
diff --git a/tests/bugs152/pr145963/adviceLabels.jar b/tests/bugs152/pr145963/adviceLabels.jar
new file mode 100644
index 000000000..054c0da2c
--- /dev/null
+++ b/tests/bugs152/pr145963/adviceLabels.jar
Binary files differ
diff --git a/tests/bugs152/pr145963/aspectInDefaultPackage.jar b/tests/bugs152/pr145963/aspectInDefaultPackage.jar
new file mode 100644
index 000000000..5db77adf6
--- /dev/null
+++ b/tests/bugs152/pr145963/aspectInDefaultPackage.jar
Binary files differ