1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-20 22:17:09 +08:00

Update proxy.md

This commit is contained in:
wtt 2023-07-31 22:10:22 +08:00
parent 9e566a516a
commit 84737ecc55

View File

@ -229,7 +229,7 @@ public class DebugInvocationHandler implements InvocationHandler {
public class JdkProxyFactory {
public static Object getProxy(Object target) {
return Proxy.newProxyInstance(
target.getClass().getClassLoader(), // 目标类的类加载
target.getClass().getClassLoader(), // 目标类的类加载
target.getClass().getInterfaces(), // 代理需要实现的接口,可指定多个
new DebugInvocationHandler(target) // 代理对象对应的自定义 InvocationHandler
);