Interface org.as2lib.env.reflect.ProxyFactory

org.as2lib.core.BasicInterface
   +--org.as2lib.env.reflect.ProxyFactory

Description

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.

Method Index

createProxy()

Inherited from BasicInterface

toString()

Method Detail

createProxy

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.

Parameters

typethe type to create a proxy for
handlerthe handler to invoke the invoke method on method invocations on the returned proxy

Return

the proxy for the given type