public final class ProxyUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
createProxy(Class clazz)
Create a proxy object that implements the interface specified by 'clazz'.
|
static Object |
createProxy(Class clazz,
Object[][] args)
Create a proxy object that implements the interface specified by 'clazz'.
|
public static Object createProxy(Class clazz)
clazz
- The interface that the proxy will supportpublic static Object createProxy(Class clazz, 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 pairsCopyright © 1998–2014 Gargoyle Software Inc.. All rights reserved.