Package org.zkoss.xel

Interface Function

All Known Implementing Classes:
MethodFunction

public interface Function
Represents a XEL function.
Since:
3.0.0
Author:
tomyeh
  • Method Summary

    Modifier and Type
    Method
    Description
    Class<?>[]
    Returns an array of Class objects that represent the formal parameter types, in declaration order, of the method represented by this Method object.
    Returns a Class object that represents the formal return type of the method represented by this Method object.
    invoke(Object obj, Object... args)
    Invokes this method with the specified arguments.
    Converts this function to a method, or null if unable to convert.
  • Method Details

    • getParameterTypes

      Class<?>[] getParameterTypes()
      Returns an array of Class objects that represent the formal parameter types, in declaration order, of the method represented by this Method object.

      Returns an array of length 0 if the underlying method takes no parameters.

    • getReturnType

      Class<?> getReturnType()
      Returns a Class object that represents the formal return type of the method represented by this Method object.
    • invoke

      Object invoke(Object obj, Object... args) throws Exception
      Invokes this method with the specified arguments.
      Parameters:
      obj - the object the underlying method is invoked from. It is always null if this function is invoked in an XEL expression. It is reserved for more sophisticated expressions, such as ZK Spreadsheet's expressions.
      args - the arguments used for the method call. If null, an Object array with zero length is assumed.
      Throws:
      Exception
    • toMethod

      Method toMethod()
      Converts this function to a method, or null if unable to convert.