Skip to content

Commit a34b33c

Browse files
committed
增加动态代理类
1 parent d907e7a commit a34b33c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cn.byhieg.designpatterntutorial.proxy.dynamicproxy;
2+
3+
import java.lang.reflect.InvocationHandler;
4+
import java.lang.reflect.Method;
5+
6+
/**
7+
* Created by shiqifeng on 2017/3/17.
8+
9+
*/
10+
public class DynamicProxy implements InvocationHandler {
11+
private Object object;
12+
13+
@Override
14+
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
15+
Object result = method.invoke(object, args);
16+
return result;
17+
}
18+
}

0 commit comments

Comments
 (0)