org.as2lib.core.BasicClass +--org.as2lib.env.reflect.InterfaceProxyFactory
ProxyFactory
InterfaceProxyFacotry
creates proxies for interfaces. It can only be
used in conjunction with interfaces, not classes.
It offers a higher performance than the TypeProxyFactory
which can
also be used with classes.
public function createProxy(interfaze:Function, handler:InvocationHandler)
Creates proxies for interfaces.
You can cast the returned proxy to the passed-in interfaze
.
null
will be returned if the passed-in interfaze
is null
or undefined
.
The returned proxy catches method invocations by using __resolve
.
Note that also methods that are not declared on the passed-in interfaze
but that are invoked on the returned proxy, get forwarded to the passed-in
handler
.
interfaze | the interface to create the proxy for |
handler | the handler to invoke on method invocations on the returned proxy |
the created interface proxy