de.intarsys.tools.functor
Class FunctorCall

java.lang.Object
  extended by de.intarsys.tools.functor.FunctorCall
All Implemented Interfaces:
IFunctorCall

public class FunctorCall
extends java.lang.Object
implements IFunctorCall

Generic implementation of IFunctorCall.


Constructor Summary
FunctorCall(java.lang.Object receiver, IArgs args)
           
 
Method Summary
static FunctorCall create(java.lang.Object receiver, java.lang.Object... arguments)
          Create an IFunctorCall with receiver 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 an IFunctorCall with receiver 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 an IFunctorCall with receiver 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 an IFunctorCall with receiver 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 interface IFunctorCall
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 interface IFunctorCall
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 interface IFunctorCall

setReceiver

public void setReceiver(java.lang.Object receiver)
Description copied from interface: IFunctorCall
Assign a new receiver.

Specified by:
setReceiver in interface IFunctorCall
Parameters:
receiver - The new receiver