org.millscript.millscript.conf.functions
Class AddFunctionFunction

java.lang.Object
  extended by org.millscript.millscript.functions.Function
      extended by org.millscript.millscript.conf.functions.AddFunctionFunction

public class AddFunctionFunction
extends Function

This class implements the configuration function AddFunction.


Constructor Summary
AddFunctionFunction(Package p)
          Constructs a new add function function, to add a function to the given package.
 
Method Summary
 void apply(Machine mc, int nargs)
          Performs this function using the specified machine, with the specified number of arguments.
 Function constructFunction(java.lang.Class<Function> functionClass)
          Returns a new instance of the specified function class.
 
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
 

Constructor Detail

AddFunctionFunction

public AddFunctionFunction(Package p)
Constructs a new add function function, to add a function to the given package.

Parameters:
p - the package we should add functions to
Method Detail

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 on
nargs - the number of arguments the function is being invoked with
See Also:
Function.apply(org.millscript.millscript.vm.Machine, int)

constructFunction

public Function constructFunction(java.lang.Class<Function> functionClass)
Returns a new instance of the specified function class.

Parameters:
functionClass - the Function class to make a new instance of.
Returns:
a new instance of the specified Function class


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.