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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.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.
      java.lang.Class<?> getReturnType()
      Returns a Class object that represents the formal return type of the method represented by this Method object.
      java.lang.Object invoke​(java.lang.Object obj, java.lang.Object... args)
      Invokes this method with the specified arguments.
      java.lang.reflect.Method toMethod()
      Converts this function to a method, or null if unable to convert.
    • Method Detail

      • getParameterTypes

        java.lang.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

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

        java.lang.Object invoke​(java.lang.Object obj,
                                java.lang.Object... args)
                         throws java.lang.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:
        java.lang.Exception
      • toMethod

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