- Class Proxy implements InvocationHandler{
- Object tar =null;
- public Object bid(Object tar){
- this.tar=tar;
- return Proxy.newProxyInstance(tar.getClass().getClassLoader(),tar.getClass.getInterfaces,this);
- }
- // 重写 Invoke 方法
- public Object invoke(Object proxy,Method method,Object[] args) throws throwable{
- Object result=null;
- result=method.invoke(tar,args);
- return result;
- }
- }