1 package jfun.yan.xml; 2 3 /** 4 * A NutsFunction is the result of the <function> tag 5 * in the Nuts configuration file. 6 * <p> 7 * @author Ben Yu 8 * Nov 23, 2005 1:41:45 AM 9 */ 10 public interface NutsFunction extends LocationAware, java.io.Serializable{ 11 /** 12 * Call the function with arguments. 13 * @param args the arguments. 14 * @return the return value. 15 */ 16 Object call(Object[] args); 17 /** 18 * Get the function name. 19 * @return the name. 20 */ 21 String getName(); 22 /** 23 * Get the number of parameters expected. 24 */ 25 int getParameterCount(); 26 27 /** 28 * Get the return type of the function. 29 * Null is returned if unknown. 30 */ 31 Class getReturnType(); 32 33 /** 34 * Get the names of the parameters. 35 */ 36 String[] getParameterNames(); 37 } 38