public class FunctorMethodHandler extends Object implements IMethodHandler, IAttributeSupport
| Constructor and Description |
|---|
FunctorMethodHandler(String name,
IFunctor invoker) |
| Modifier and Type | Method and Description |
|---|---|
static IMethodHandler |
create(IFunctor functor) |
Object |
getAttribute(Object key)
Get an attribute value from the context
|
IFunctor |
getInvoker() |
String |
getName() |
Object |
invoke(Object receiver,
IArgs args)
Execute the implementation associated with this method in the context of
the
receiver and return the result. |
Object |
removeAttribute(Object key)
Remove an attribute binding in the context
|
Object |
setAttribute(Object key,
Object value)
Set the value of an attribute in the context
|
public static IMethodHandler create(IFunctor functor)
public Object getAttribute(Object key)
IAttributeSupportgetAttribute in interface IAttributeSupportkey - the name of the attribute to getkeypublic IFunctor getInvoker()
public String getName()
public Object invoke(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 Object removeAttribute(Object key)
IAttributeSupportremoveAttribute in interface IAttributeSupportkey - the name of the attribute to removekeypublic Object setAttribute(Object key, Object value)
IAttributeSupportsetAttribute in interface IAttributeSupportkey - the name of the attribute to setvalue - the new value the attributekeyCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.