public class FunctorMethodHandler extends java.lang.Object implements IMethodHandler, IAttributeSupport
| Constructor and Description |
|---|
FunctorMethodHandler(java.lang.String name,
IFunctor invoker) |
| Modifier and Type | Method and Description |
|---|---|
static IMethodHandler |
create(IFunctor functor) |
java.lang.Object |
getAttribute(java.lang.Object key)
Get an attribute value from the context
|
IFunctor |
getInvoker() |
java.lang.String |
getName() |
java.lang.Object |
invoke(java.lang.Object receiver,
IArgs args)
Execute the implementation associated with this method in the context of
the
receiver and return the result. |
java.lang.Object |
removeAttribute(java.lang.Object key)
Remove an attribute binding in the context
|
java.lang.Object |
setAttribute(java.lang.Object key,
java.lang.Object value)
Set the value of an attribute in the context
|
public FunctorMethodHandler(java.lang.String name,
IFunctor invoker)
public static IMethodHandler create(IFunctor functor)
public java.lang.Object getAttribute(java.lang.Object key)
IAttributeSupportgetAttribute in interface IAttributeSupportkey - the name of the attribute to getkeypublic IFunctor getInvoker()
public java.lang.String getName()
public java.lang.Object invoke(java.lang.Object receiver,
IArgs args)
throws MethodInvocationException
IMethodHandlerreceiver and return the result.invoke in interface IMethodHandlerreceiver - The object implementing the method.args - The arguments for the invocation.MethodInvocationExceptionpublic java.lang.Object removeAttribute(java.lang.Object key)
IAttributeSupportremoveAttribute in interface IAttributeSupportkey - the name of the attribute to removekeypublic java.lang.Object setAttribute(java.lang.Object key,
java.lang.Object value)
IAttributeSupportsetAttribute in interface IAttributeSupportkey - the name of the attribute to setvalue - the new value the attributekey