Package de.intarsys.tools.functor
Class FunctorCall
- java.lang.Object
-
- de.intarsys.tools.functor.FunctorCall
-
- All Implemented Interfaces:
IFunctorCall
public class FunctorCall extends java.lang.Object implements IFunctorCall
Generic implementation ofIFunctorCall
.
-
-
Constructor Summary
Constructors Constructor Description FunctorCall(java.lang.Object receiver, IArgs args)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FunctorCall
create(java.lang.Object receiver, java.lang.Object... arguments)
Create anIFunctorCall
withreceiver
as the receiver and the indexed arguments.IArgs
getArgs()
The arguments currently associated with the call.java.lang.Object
getReceiver()
The receiver for the behavior implemented.static FunctorCall
noargs(java.lang.Object receiver)
Create anIFunctorCall
withreceiver
as the receiver and no arguments.void
setArgs(IArgs args)
Assign an argument list for the call.void
setReceiver(java.lang.Object receiver)
Assign a new receiver.
-
-
-
Constructor Detail
-
FunctorCall
public FunctorCall(java.lang.Object receiver, IArgs args)
-
-
Method Detail
-
create
public static FunctorCall create(java.lang.Object receiver, java.lang.Object... arguments)
Create anIFunctorCall
withreceiver
as the receiver and the indexed arguments.- Parameters:
receiver
- The receiver for the call.arguments
- The indexed arguments for the call.- Returns:
- The new
IFunctorCall
-
noargs
public static FunctorCall noargs(java.lang.Object receiver)
Create anIFunctorCall
withreceiver
as the receiver and no arguments.- Parameters:
receiver
- The receiver for the call.- Returns:
- The new
IFunctorCall
-
getArgs
public IArgs getArgs()
Description copied from interface:IFunctorCall
The arguments currently associated with the call.- Specified by:
getArgs
in interfaceIFunctorCall
- Returns:
- The arguments currently associated with the call.
-
getReceiver
public java.lang.Object getReceiver()
Description copied from interface:IFunctorCall
The receiver for the behavior implemented.- Specified by:
getReceiver
in interfaceIFunctorCall
- Returns:
- The receiver for the behavior implemented.
-
setArgs
public void setArgs(IArgs args)
Description copied from interface:IFunctorCall
Assign an argument list for the call.This is for example useful when handling with declarations modifying the original functor call.
- Specified by:
setArgs
in interfaceIFunctorCall
-
setReceiver
public void setReceiver(java.lang.Object receiver)
Description copied from interface:IFunctorCall
Assign a new receiver.- Specified by:
setReceiver
in interfaceIFunctorCall
- Parameters:
receiver
- The new receiver
-
-