1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Update proxy.md

This commit is contained in:
guide 2022-06-16 14:26:29 +08:00
parent 2d8ec81e0e
commit 83d06dcee3

View File

@ -272,13 +272,12 @@ after method send
public interface MethodInterceptor
extends Callback{
// 拦截被代理类中的方法
public Object intercept(Object obj, java.lang.reflect.Method method, Object[] args,
MethodProxy proxy) throws Throwable;
public Object intercept(Object obj, java.lang.reflect.Method method, Object[] args,MethodProxy proxy) throws Throwable;
}
```
1. **obj** :被代理的对象(需要增强的对象)
1. **obj** : 动态生成的代理对象
2. **method** : 被拦截的方法(需要增强的方法)
3. **args** : 方法入参
4. **proxy** : 用于调用原始方法