info.javelot.functionalj
Interface IFunctionN


public interface IFunctionN

Interface to be implemented to define a function that accepts N parameters in the form of an array of Objects and that returns an Object as a result.

It is not necessary to implement this interface in order to use functions. Subclasses of ReflectionFunction can be used to construct Function objects using reflection. However, if you do not want to use reflection (for performance reasons, more compile-time validation, easier refactoring, or any other reason), using this interface and the FunctionN class gives* you an alternative.

Author:
Copyright © 2006 Frederic Daoud

Method Summary
 Object call(Object[] p_parameters)
          Invoked automatically when the Function.call() method is invoked on the FunctionN object that wraps this instance of IFunctionN.
 

Method Detail

call

public Object call(Object[] p_parameters)
            throws Exception
Invoked automatically when the Function.call() method is invoked on the FunctionN object that wraps this instance of IFunctionN.

Parameters:
p_parameters - the parameters to the function.
Returns:
the result of calling the function on the parameters.
Throws:
Exception - thrown if an exception occurs; this exception will be wrapped in a FunctionException.