public interface T1{ public void method(); }; public class Item implements T1{ public void method(); } public class ItemProxy implements T1{ Item item; Client client; public ItemProxy(Client c){ this.Client=c; this.item=new item(); } public void method(){ if (client,allow()){ item.method1(); }else{ return; } } } public class Client{ T1 t; public Client() { t=new ItemProxy(this); } public void method1() { t.method(); } }