Class org.as2lib.env.reflect.InterfaceProxyFactory

org.as2lib.core.BasicClass
   +--org.as2lib.env.reflect.InterfaceProxyFactory

Implemented Interfaces

ProxyFactory

Description

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.

Method Index

createProxy()

Inherited from BasicClass

toString()

Method Detail

createProxy

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.

Parameters

interfazethe interface to create the proxy for
handlerthe handler to invoke on method invocations on the returned proxy

Return

the created interface proxy

Specified By

createProxy() in org.as2lib.env.reflect.ProxyFactory