aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5
diff options
context:
space:
mode:
authoraclement <aclement>2005-12-19 13:51:15 +0000
committeraclement <aclement>2005-12-19 13:51:15 +0000
commit93f74cbbd62ebdc6d0ae1f050438f94f2f0eb782 (patch)
treed2ef5d15612135e9752d0b2af51382908a15c0b4 /tests/java5
parent0de667394fefef642b8660e39e0e6dc723f609de (diff)
downloadaspectj-93f74cbbd62ebdc6d0ae1f050438f94f2f0eb782.tar.gz
aspectj-93f74cbbd62ebdc6d0ae1f050438f94f2f0eb782.zip
more tests.
Diffstat (limited to 'tests/java5')
-rw-r--r--tests/java5/decps/Basic2b.java2
-rw-r--r--tests/java5/decps/Basic3b.java2
-rw-r--r--tests/java5/decps/Basic3c.java39
3 files changed, 41 insertions, 2 deletions
diff --git a/tests/java5/decps/Basic2b.java b/tests/java5/decps/Basic2b.java
index 59092e5c6..03c88f80d 100644
--- a/tests/java5/decps/Basic2b.java
+++ b/tests/java5/decps/Basic2b.java
@@ -14,7 +14,7 @@ public class Basic2b {
interface I {
}
- class IImpl implements I {
+ static class IImpl implements I {
public void m2() { }
}
diff --git a/tests/java5/decps/Basic3b.java b/tests/java5/decps/Basic3b.java
index e2bb111d1..1d4ecfe5a 100644
--- a/tests/java5/decps/Basic3b.java
+++ b/tests/java5/decps/Basic3b.java
@@ -21,7 +21,7 @@ public class Basic3b {
public void m4();
}
- class IImpl implements I {
+ static class IImpl implements I {
public void m2() { }
public void m3() { }
public void m4() { }
diff --git a/tests/java5/decps/Basic3c.java b/tests/java5/decps/Basic3c.java
new file mode 100644
index 000000000..f050054e4
--- /dev/null
+++ b/tests/java5/decps/Basic3c.java
@@ -0,0 +1,39 @@
+import org.aspectj.lang.annotation.*;
+
+public class Basic3c {
+ public static void main(String []argv) {
+ Basic3c b = new Basic3c();
+ if (!(b instanceof X.I)) throw new RuntimeException("Basic3c should implement I");
+ ((X.I)b).m2();
+ ((X.I)b).m3();
+ ((X.I)b).m2();
+ ((X.I)b).m4();
+ }
+}
+
+
+
+@Aspect class X {
+
+ interface I {
+ public void m2();
+ public void m3();
+ public void m4();
+ }
+
+ class IImpl implements I {
+ public void m2() { }
+ public void m3() { }
+ public void m4() { }
+ }
+
+
+ @DeclareParents(value="Basic3c",defaultImpl=IImpl.class)
+ private I simplefield;
+
+
+ @Before("call(* *(..))")
+ public void advice1() {}
+
+}
+