- All Known Implementing Classes:
public interface MethodExecutor
MethodExecutors are built by the resolvers and can be cached by the infrastructure to repeat an operation quickly without going back to the resolvers. For example, the particular method to run on an object may be discovered by the reflection method resolver - it will then build a MethodExecutor that executes that method and the MethodExecutor can be reused without needing to go back to the resolver to discover the method again.
They can become stale, and in that case should throw an AccessException: This will cause the infrastructure to go back to the resolvers to ask for a new one.
- Andy Clement
(EvaluationContext context, Object target, Object... arguments) throws AccessExceptionExecute a command using the specified arguments, and using the specified expression state.
context- the evaluation context in which the command is being executed
target- the target object of the call - null for static methods
arguments- the arguments to the executor, should match (in terms of number and type) whatever the command will need to run
- the value returned from execution
AccessException- if there is a problem executing the command or the MethodExecutor is no longer valid