org.as2lib.core.BasicInterface +--org.as2lib.env.reflect.ProxyFactory
ProxyFactory
declares methods to create dynamic proxies, that means at
run-time, of specific types, that are classes or interfaces.
Methods that get invoked on the returned proxy are forwared to an invocation handler that is responsible to respond appropriately to the method invocation.
public function createProxy(type:Function, handler:InvocationHandler)
Creates a proxy for the given type
and delegates method invocations on
this proxy to the InvocationHandler.invoke method.
Types are classes and interfaces.
The returned proxy can be casted to the passed-in type
.
type | the type to create a proxy for |
handler | the handler to invoke the invoke method on method
invocations on the returned proxy
|
the proxy for the given type