- Enclosing class:
- ExpressionParser
public static interface ExpressionParser.ESPMethodReference
Interface implemented by ExpressionParser objects that represent
a method reference.
-
Method Summary
-
Method Details
-
invoke
Object invoke(Object... fargs) throws IllegalArgumentException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException 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 appropriateIllegalAccessException
- a class or method was not accessibleNoSuchMethodException
- the method could not be foundInvocationTargetException
- the operation failed when the method or constructor was being executedInstantiationException
- a constructor failed
-
convert
Convert this object to a functional interface.- Type Parameters:
T
- the type for the classfunctionalInterface
- Parameters:
functionalInterface
- the class for the functional interface- Returns:
- an object that implements the functional interface
-