aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/IntroducingPrivateMethodsOnInterfaces.java
diff options
context:
space:
mode:
authorwisberg <wisberg>2002-12-16 18:51:06 +0000
committerwisberg <wisberg>2002-12-16 18:51:06 +0000
commit144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch)
treeb12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/new/IntroducingPrivateMethodsOnInterfaces.java
parentfafae443719b26159ab2d7dac1c9b46b5e00b671 (diff)
downloadaspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz
aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip
initial version
Diffstat (limited to 'tests/new/IntroducingPrivateMethodsOnInterfaces.java')
-rw-r--r--tests/new/IntroducingPrivateMethodsOnInterfaces.java77
1 files changed, 77 insertions, 0 deletions
diff --git a/tests/new/IntroducingPrivateMethodsOnInterfaces.java b/tests/new/IntroducingPrivateMethodsOnInterfaces.java
new file mode 100644
index 000000000..f1340f143
--- /dev/null
+++ b/tests/new/IntroducingPrivateMethodsOnInterfaces.java
@@ -0,0 +1,77 @@
+import org.aspectj.testing.Tester;
+import org.aspectj.testing.Tester;
+public class IntroducingPrivateMethodsOnInterfaces {
+ public static void main(String[] args) {
+ AA.go();
+ }
+ static {
+ Tester.expectEvent("private_private");
+ Tester.expectEvent("private_package");
+ Tester.expectEvent("private_public");
+ Tester.expectEvent("package_private");
+ Tester.expectEvent("package_package");
+ Tester.expectEvent("package_public");
+ Tester.expectEvent("public_private");
+ Tester.expectEvent("public_package");
+ Tester.expectEvent("public_public");
+ }
+}
+
+interface I {}
+class C {
+
+// private void _private(String s) { Tester.event("private_"+s); }
+// /*package*/ void _package(String s) { Tester.event("package_"+s); }
+// public void _public(String s) { Tester.event("public_"+s); }
+
+// private void private_private() { _private("private"); }
+// private void private_package() { _package("private"); }
+// private void private_public() { _public("private"); }
+
+// /*package*/ void package_private() { _private("package"); }
+// /*package*/ void package_package() { _package("package"); }
+// /*package*/ void package_public() { _public("package"); }
+
+// public void public_private() { _private("public"); }
+// public void public_package() { _package("public"); }
+// public void public_public() { _public("public"); }
+
+}
+
+aspect AA {
+
+ public static void go() {
+ I c = new C();
+ c.private_private();
+ c.private_package();
+ c.private_public();
+
+ c.package_private();
+ c.package_package();
+ c.package_public();
+
+ c.public_private();
+ c.public_package();
+ c.public_public();
+ }
+
+ private void I._private(String s) { Tester.event("private_"+s); }
+ /*package*/ void I._package(String s) { Tester.event("package_"+s); }
+ public void I._public(String s) { Tester.event("public_"+s); }
+
+ private void I.private_private() { _private("private"); }
+ private void I.private_package() { _package("private"); }
+ private void I.private_public() { _public("private"); }
+
+ /*package*/ void I.package_private() { _private("package"); }
+ /*package*/ void I.package_package() { _package("package"); }
+ /*package*/ void I.package_public() { _public("package"); }
+
+ public void I.public_private() { _private("public"); }
+ public void I.public_package() { _package("public"); }
+ public void I.public_public() { _public("public"); }
+}
+
+aspect A {
+ declare parents: C implements I;
+}