MethodExecutor typedef
MethodExecutor =
Object? Function(EvaluationContext context, Object target, List<Object?> arguments)
The function a MethodResolver returns to run one method call: it gets the target and the evaluated arguments and returns the result.
Throw an AccessException to report a failure as
exceptionDuringMethodInvocation (EL1029E); any other exception
reaches the caller of getValue unchanged.
// Runs `text.padLeft(n)` for an expression `text.padLeft(8)`.
MethodExecutor executor = (context, target, args) =>
(target as String).padLeft(args.first! as int);
Spring (Java):
TypedValue result = executor.execute(context, target, arguments);
Implementation
typedef MethodExecutor = Object? Function(
EvaluationContext context,
Object target,
List<Object?> arguments,
);