Interface ExpressionParser.ESPMethodReference

Enclosing class:
ExpressionParser

public static interface ExpressionParser.ESPMethodReference
Interface implemented by ExpressionParser objects that represent a method reference.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    convert(Class<T> functionalInterface)
    Convert this object to a functional interface.
    invoke(Object... fargs)
    Call this method reference's method.
  • Method Details

    • invoke

      Call this method reference's method. A method reference is represented by ExpressionParser as an object, The invoke method calls the referenced method:
      • For the case CLASSNAME::METHOD where the method is static, that static method is called with all of the arguments
      • For the case CLASSNAME::METHOD where the method is an instance method, the first argument is treated as the object to which the method will be applied, with the remaining arguments as the method's arguments.
      • For the case OBJECT::METHOD, the method must be an instance method for that object, and this method will be called with the specified arguments.
      Parameters:
      fargs - this function's arguments
      Returns:
      the value produced by invoking this function.
      Throws:
      IllegalArgumentException - an argument was not appropriate
      IllegalAccessException - a class or method was not accessible
      NoSuchMethodException - the method could not be found
      InvocationTargetException - the operation failed when the method or constructor was being executed
      InstantiationException - a constructor failed
    • convert

      <T> T convert(Class<T> functionalInterface)
      Convert this object to a functional interface.
      Type Parameters:
      T - the type for the class functionalInterface
      Parameters:
      functionalInterface - the class for the functional interface
      Returns:
      an object that implements the functional interface