invocationHander的invoke方法

Object invoke(Object proxy, Method method, Object[] args) throws Throwable


Object proxy 是你的代理对象实例
Method method  就是你被代理的对象中的方法对象,你可以根据方法不同对不同方法拦截后作不同操作。
Object[] args 是方法的参数列表,要与被代理的对像的方法参数列表一致

你可能感兴趣的:(invocationHander的invoke方法)