public final class ProxyUtil
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
ProxyUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
createProxy(java.lang.Class clazz)
Create a proxy object that implements the interface specified by 'clazz'.
|
static java.lang.Object |
createProxy(java.lang.Class clazz,
java.lang.Object[][] args)
Create a proxy object that implements the interface specified by 'clazz'.
|
public static java.lang.Object createProxy(java.lang.Class clazz)
clazz - The interface that the proxy will supportpublic static java.lang.Object createProxy(java.lang.Class clazz,
java.lang.Object[][] args)
final Object args[][] = {
{"getAutoCommit", Boolean.TRUE},
{"getCatalog", "foobar"}
};
final Connection connection = ProxyUtil.createProxy(Connection.class, args);
Calling getAutoCommit() on this object will return true. Calling getCatalog()
on this object will return "foobar". Calling any other method will return null.clazz - The interface that will be supported by the generated proxyargs - methodname/object pairs