Michiel Meeuwissen wrote:

- An object where it works on (node, nodeManager, module)
- A String identifying it ('command')
- A List or a Map with auxiliary parameters
- 'standard' parameters like a ServletRequest and ServletResponse object

The Parameters object works like this:

Every possible parameter is defined by a "Parameter" object which is a
simply container with the following entries:
    String key;
    Class type;
and also (these two are less essential):
    String description  = "";
    Object defaultValue = null


Because it knows the complete definition of the function it is for, it can be filled as a Map, because every Parameter is assosciated with a key.

So, it is also easy to make a Map of a Parameters object (with the 'toMap'
method).

So this way you define the signature of a function, however will it allow for 'overloading' functions, i.e. the same name but different parameters ?

abstract public class Function {

protected Function(String name, Parameter[] def, ReturnType returnType);


Ok this allows for dynamic loading, have you got any ideas about that, how to register and load different functions ?
Another thing is ordering of functions, since some of them might be order
dependent.



-- Rico Jansen ([EMAIL PROTECTED]) "You call it untidy, I call it LRU ordered" -- Daniel Barlow



Reply via email to