aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/PointcutLibraryTest.java
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-07-28 22:38:47 +0000
committerwisberg <wisberg>2003-07-28 22:38:47 +0000
commitd5a63db3a0bfca32ef54e82685179894db10c327 (patch)
tree4c871e36d3dc06673f62f37c8fb1626eb7a3413c /tests/bugs/PointcutLibraryTest.java
parent10fb3c602d53d02377e80b45687cbbf0096d71dc (diff)
downloadaspectj-d5a63db3a0bfca32ef54e82685179894db10c327.tar.gz
aspectj-d5a63db3a0bfca32ef54e82685179894db10c327.zip
@testcase PR#40876 subtype-qualified pointcut reference
(ClassFormatError)
Diffstat (limited to 'tests/bugs/PointcutLibraryTest.java')
-rw-r--r--tests/bugs/PointcutLibraryTest.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/bugs/PointcutLibraryTest.java b/tests/bugs/PointcutLibraryTest.java
new file mode 100644
index 000000000..17ce36b52
--- /dev/null
+++ b/tests/bugs/PointcutLibraryTest.java
@@ -0,0 +1,50 @@
+/*
+ * This test case produces a ClassFormatError under 1.1.0, but
+ * the code is not set up to run/test correctly
+ * after the bug is fixed.
+ */
+
+/** @testcase PR#40876 subtype-qualified pointcut reference */
+public class PointcutLibraryTest {
+ public static void main(String[] a) {
+ new Test().run();
+ }
+}
+
+class Test {
+ public void run(){ prun(); }
+ private void prun() {
+ System.out.println("Test.prun()");
+ }
+}
+
+/** private default implementation of library */
+class PrivatePointcutLibrary {
+ pointcut adviceCflow() : !cflow(adviceexecution());
+ pointcut publicCalls() : call(public * *(..))
+ && !adviceCflow();
+}
+
+/** public interface for library */
+class PointcutLibrary extends PrivatePointcutLibrary {
+}
+
+// ---- different clients of the library
+
+/** use library by inheriting scope in class */
+class CPL extends PointcutLibrary {
+ static aspect A {
+ before() : publicCalls() {
+ System.out.println("CPL: "
+ + thisJoinPointStaticPart);
+ }
+ }
+}
+
+/** client by external reference to CPL */
+aspect ExternalClientOfCPL {
+ before() : CPL.publicCalls() { // remove this to avoid bug?
+ System.out.println("XDP: "
+ + thisJoinPointStaticPart);
+ }
+}