|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| package net.sf.crispy.proxy; |
|
6 |
| |
|
7 |
| import java.lang.reflect.InvocationHandler; |
|
8 |
| import java.lang.reflect.Proxy; |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| public class DynamicJdkProxy extends DynamicProxy implements InvocationHandler { |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| |
|
21 |
342
| public Object newInstance (Class pvClass) {
|
|
22 |
342
| super.newInstance(pvClass);
|
|
23 |
342
| Object lvProxyObject = Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {pvClass}, this);
|
|
24 |
| if (log.isDebugEnabled()) { log.debug("Generated proxy for class: " + pvClass); } |
|
25 |
342
| return lvProxyObject;
|
|
26 |
| } |
|
27 |
| |
|
28 |
| |
|
29 |
| } |