org.millscript.millscript.functions
Class ManyBodyFunction
java.lang.Object
org.millscript.millscript.functions.Function
org.millscript.millscript.functions.ManyBodyFunction
public class ManyBodyFunction
- extends Function
This class provides multiple dispatch functions for MillScript. The point
here is to allow multiple function definitions with different type
signatures, that dispatch on specified arguments.
|
Method Summary |
void |
apply(Machine mc,
int nargs)
Performs this function using the specified machine, with the specified
number of arguments. |
void |
setMethodEntry(Machine mc,
SpiceClass sc,
Function func)
Sets the Function body for the specified type signature. |
| Methods inherited from class org.millscript.millscript.functions.Function |
applyUpdater, checkNargs, checkNargsGT, checkUNargs, getName, modName, reportNargsError, reportNargsGTError, setName, toString, tryClone |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ManyBodyFunction
public ManyBodyFunction(Machine mc,
SpiceClass sc,
Function lf)
- Constructs a new ManyBodyFunction with the specified initial method
entry.
- Parameters:
mc - the current Machinesc - the spice class to dispatch onlf - the Function to execute for the specified type signature
apply
public void apply(Machine mc,
int nargs)
- Description copied from class:
Function
- Performs this function using the specified machine, with the specified
number of arguments.
- Specified by:
apply in class Function
- Parameters:
mc - the machine to perform this function onnargs - the number of arguments the function is being invoked with- See Also:
Function.apply(org.millscript.millscript.vm.Machine, int)
setMethodEntry
public void setMethodEntry(Machine mc,
SpiceClass sc,
Function func)
- Sets the Function body for the specified type signature.
- Parameters:
mc - the current Machinesc - the spice class to dispatch onfunc - the Function to execute for the specified type signature
Copyright © 2001-2007 Open World Ltd. All Rights Reserved.