import java.lang.annotation.*; import java.lang.ref.*; import java.util.*; public class Case7 { public static void main(String []argv) { String s = "hello"; Integer i = 35; List l = new ArrayList(); List ls = new ArrayList(); List ln = new ArrayList(); List ll = new ArrayList(); A a = new A(); a.setN(ls,s); String s2 = a.getN(ls); System.err.println("in="+s+" out="+s2); B b = new B(); b.setN(ln,i); System.err.println("in="+i+" out="+b.getN(ln)); C c = new C(); c.setN(ll,l); List l2 = c.getN(ll); System.err.println("in="+l+" out="+l2); } } interface I { N getN(List ns); void setN(List ns,N n); } aspect X { Q I.value; public P I

.getN(List

ps) { return value; } public void I.setN(List ns,N n) { this.value = n; } declare parents : A implements I; declare parents : B implements I; declare parents : C implements I; } class A { } class B { } class C { }