ProxyFactory
TypeProxyFactory creates proxies of types, that means classes or
interfaces.
If you know that you only need interface proxies you could think of using InterfaceProxyFactory because it offers better performance.
public function createProxy(type:Function, handler:InvocationHandler)
Creates proxies for the passed-in type, that are classes and interfaces.
You can cast the returned proxy to the passed-in type.
null will be returned if the passed-in type is null
or undefined.
This proxy catches method invocations by creating proxy methods for every
method of the type that forward the invocations to the handler. Unknown,
that means not declared or implemented methods are catched by __resolve.
Note that also methods that are not declared on the type but get
invoked on the proxy, are forwarded to the passed-in handler.
type | the type to create the proxy for |
handler | the handler to invoke on proxy method invocations |
the created type proxy