]> source.dussan.org Git - aspectj.git/commitdiff
246918: perclause: testcode
authoraclement <aclement>
Thu, 11 Sep 2008 07:11:27 +0000 (07:11 +0000)
committeraclement <aclement>
Thu, 11 Sep 2008 07:11:27 +0000 (07:11 +0000)
tests/bugs162/pr246918/Base.java [new file with mode: 0644]
tests/bugs162/pr246918/Base2.java [new file with mode: 0644]
tests/bugs162/pr246918/Code.java [new file with mode: 0644]
tests/bugs162/pr246918/Dode.java [new file with mode: 0644]
tests/bugs162/pr246918/aop1.xml [new file with mode: 0644]
tests/bugs162/pr246918/aop2.xml [new file with mode: 0644]
tests/bugs162/pr246918/aop3.xml [new file with mode: 0644]
tests/bugs162/pr246918/aop4.xml [new file with mode: 0644]
tests/bugs162/pr246918/readme.txt [new file with mode: 0644]

diff --git a/tests/bugs162/pr246918/Base.java b/tests/bugs162/pr246918/Base.java
new file mode 100644 (file)
index 0000000..463203f
--- /dev/null
@@ -0,0 +1,6 @@
+public abstract aspect Base pertypewithin(*) {
+  before(): execution(* *(..)) && !within(Base+) { 
+    System.err.println("advice fired "+thisJoinPoint.getSourceLocation().getWithinType());
+  }
+}
+
diff --git a/tests/bugs162/pr246918/Base2.java b/tests/bugs162/pr246918/Base2.java
new file mode 100644 (file)
index 0000000..c68a85e
--- /dev/null
@@ -0,0 +1,8 @@
+public abstract aspect Base2 pertypewithin(*) {
+  abstract pointcut scope();
+
+  before(): execution(* *(..)) && !within(Base2+) && scope() { 
+    System.err.println("advice fired "+thisJoinPoint.getSourceLocation().getWithinType());
+  }
+}
+
diff --git a/tests/bugs162/pr246918/Code.java b/tests/bugs162/pr246918/Code.java
new file mode 100644 (file)
index 0000000..23d764f
--- /dev/null
@@ -0,0 +1,5 @@
+public class Code {
+  public static void main(String[] argv) {
+    new Dode().foo();
+  }
+}
diff --git a/tests/bugs162/pr246918/Dode.java b/tests/bugs162/pr246918/Dode.java
new file mode 100644 (file)
index 0000000..305c586
--- /dev/null
@@ -0,0 +1,3 @@
+public class Dode {
+  public void foo() {}
+}
diff --git a/tests/bugs162/pr246918/aop1.xml b/tests/bugs162/pr246918/aop1.xml
new file mode 100644 (file)
index 0000000..84ed60c
--- /dev/null
@@ -0,0 +1,10 @@
+<aspectj>
+  <aspects>
+    <concrete-aspect name="SubAspect" extends="Base" >
+      <pointcut name="scope" expression="within(*)"/>
+    </concrete-aspect>
+  </aspects>
+  <!-- weaver options="-verbose -showWeaveInfo -debug"-->
+  <weaver options="">
+  </weaver>
+</aspectj>
diff --git a/tests/bugs162/pr246918/aop2.xml b/tests/bugs162/pr246918/aop2.xml
new file mode 100644 (file)
index 0000000..a90e7ef
--- /dev/null
@@ -0,0 +1,9 @@
+<aspectj>
+  <aspects>
+    <concrete-aspect name="SubAspect" extends="Base" perclause="pertypewithin(D*)">
+    
+    </concrete-aspect>
+  </aspects>
+  <weaver>
+  </weaver>
+</aspectj>
diff --git a/tests/bugs162/pr246918/aop3.xml b/tests/bugs162/pr246918/aop3.xml
new file mode 100644 (file)
index 0000000..4d2daf6
--- /dev/null
@@ -0,0 +1,10 @@
+<aspectj>
+  <aspects>
+    <concrete-aspect name="SubAspect" extends="Base2" perclause="pertypewithin(*)">
+      <pointcut name="scope" expression="within(D*)"/>
+    </concrete-aspect>
+  </aspects>
+  <!-- weaver options="-verbose -showWeaveInfo -debug"-->
+  <weaver options="">
+  </weaver>
+</aspectj>
diff --git a/tests/bugs162/pr246918/aop4.xml b/tests/bugs162/pr246918/aop4.xml
new file mode 100644 (file)
index 0000000..7b7436c
--- /dev/null
@@ -0,0 +1,10 @@
+<aspectj>
+  <aspects>
+    <concrete-aspect name="SubAspect" extends="Base2" perclause="persausage(*)">
+      <pointcut name="scope" expression="within(D*)"/>
+    </concrete-aspect>
+  </aspects>
+  <!-- weaver options="-verbose -showWeaveInfo -debug"-->
+  <weaver options="">
+  </weaver>
+</aspectj>
diff --git a/tests/bugs162/pr246918/readme.txt b/tests/bugs162/pr246918/readme.txt
new file mode 100644 (file)
index 0000000..18dc5d5
--- /dev/null
@@ -0,0 +1,3 @@
+aop1 - ptw base aspect with concrete aspect including single pointcut
+aop2 - ptw sub aspect limiting application to D* type (no xml pointcut)
+aop3 - ptw sub aspect, concretized scope in sub aspect