接口 MethodExecutor
- 所有已知实现类:
ReflectiveMethodExecutor
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.
- 从以下版本开始:
- 4.0
- 作者:
- Andy Clement
-
方法概要
修饰符和类型方法说明execute(EvaluationContext context, Object target, Object... arguments) Execute a command using the specified arguments, and using the specified expression state.
-
方法详细资料
-
execute
TypedValue execute(EvaluationContext context, Object target, Object... arguments) throws AccessException Execute a command using the specified arguments, and using the specified expression state.- 参数:
context- the evaluation context in which the command is being executedtarget- the target object of the call - null for static methodsarguments- 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
-