aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5
diff options
context:
space:
mode:
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() {}
+
+}
+