Method
newProxyInstance
(ClassLoader loader,
Class[] interfaces,
InvocationHandler handler)
Source from the content-addressed store, hash-verified
| 412 | } |
| 413 | |
| 414 | public static Object newProxyInstance(ClassLoader loader, |
| 415 | Class[] interfaces, |
| 416 | InvocationHandler handler) |
| 417 | { |
| 418 | try { |
| 419 | return Proxy.getProxyClass(loader, interfaces) |
| 420 | .getConstructor(new Class[] { InvocationHandler.class }) |
| 421 | .newInstance(new Object[] { handler }); |
| 422 | } catch (Exception e) { |
| 423 | AssertionError error = new AssertionError(); |
| 424 | error.initCause(e); |
| 425 | throw error; |
| 426 | } |
| 427 | } |
| 428 | } |