java动态代理

关于动态代理,这里在网上收集了一份整理比较好的,请点击此处

做一下笔记:

1. 重要的接口和类,及其重要方法:

  接口:

InvocationHandler.invoke(Object proxy, Method method, Object[] args) // Processes a method invocation on a proxy instance and returns the result.

动态代理类实现接口。

  类:

Proxy.newProxyInstance(ClassLoader loader, Class<?>[] interface, InnocationHandler h) // 得到一个动态的代理对象

2. 奉上一份自己整理的:动态代理创建代理对象及执行方法的时序图

原文地址:https://www.cnblogs.com/tf-Y/p/10305131.html