newProxy

@JvmName(name = "newProxyJava")
inline fun <T> newProxy(noinline handler: (proxy: Any, method: Method, args: Array<Any>) -> Any): T(source)

Returns a proxy instance that implements T by dispatching method invocations to handler. The class loader of T will be used to define the proxy class. To implement multiple interfaces or specify a class loader, use Proxy.newProxyInstance.

See also

Throws

if T does not specify the type of a Java interface