diff options
author | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
commit | 144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch) | |
tree | b12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/new/GeneratingDuplicateNamedAdviceMethodsInAbstractAspectsWithExtendedAspect.java | |
parent | fafae443719b26159ab2d7dac1c9b46b5e00b671 (diff) | |
download | aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip |
initial version
Diffstat (limited to 'tests/new/GeneratingDuplicateNamedAdviceMethodsInAbstractAspectsWithExtendedAspect.java')
-rw-r--r-- | tests/new/GeneratingDuplicateNamedAdviceMethodsInAbstractAspectsWithExtendedAspect.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/new/GeneratingDuplicateNamedAdviceMethodsInAbstractAspectsWithExtendedAspect.java b/tests/new/GeneratingDuplicateNamedAdviceMethodsInAbstractAspectsWithExtendedAspect.java new file mode 100644 index 000000000..5c561cc75 --- /dev/null +++ b/tests/new/GeneratingDuplicateNamedAdviceMethodsInAbstractAspectsWithExtendedAspect.java @@ -0,0 +1,46 @@ +import org.aspectj.testing.Tester; +import org.aspectj.testing.Tester; + +public class + GeneratingDuplicateNamedAdviceMethodsInAbstractAspectsWithExtendedAspect +{ + public static void main(String[] args) { + new GeneratingDuplicateNamedAdviceMethodsInAbstractAspectsWithExtendedAspect().realMain(args); + } + public void realMain(String[] args) { + new C().c(); + Tester.checkAllEvents(); + } + static { + Tester.expectEvent("c"); + String[] strs = {"before","after","around"}; + for (int i = 0; i < strs.length; i++) { + int[] is = new int[] {1,2}; + for (int j = 0; j < is.length; j++) { + Tester.expectEvent(strs[i]+is[j]); + } + } + + } +} + +class C { + public void c() { Tester.event("c"); } +} + +abstract aspect A { + pointcut c(): call(void C.c()); + protected static void a(String str, Object o) { + Class c = o.getClass(); + Tester.event(str); + Tester.check(!A.class.equals(c), "A is abstract!"); + Tester.check(Inner.class.equals(c), "Inner must equal "+c); + } + after(): c() { a("after1", this); } + after(): c() { a("after2", this); } + before(): c() { a("before1", this); } + before(): c() { a("before2", this); } + void around(): c() { a("around1", this); proceed(); } + void around(): c() { a("around2", this); proceed(); } + static aspect Inner extends A {} +} |