静态代理
真实角色
代理角色
//静态代理
interface xx{
public void yy();
}
//真实对象
class x1 implements xx{
public void yy(){}
}
//代理对象
class x implements xx{
private xx t;
public x(xx t){
this.t=t;
}
public void yy(){
before();
this.t.yy();
after();
}
public void before(){};
public void after(){};
}