接口 MethodExecutor
- 所有已知实现类:
ReflectiveMethodExecutor
public interface MethodExecutor
A
MethodExecutor is built by a MethodResolver and can be cached
by the infrastructure to repeat an operation quickly without going back to the
resolvers.
For example, the particular method to execute on an object may be discovered
by a MethodResolver which then builds a MethodExecutor that
executes that method, and the resolved MethodExecutor can be reused
without needing to go back to the resolvers to discover the method again.
If a MethodExecutor becomes stale, it should throw an
AccessException which signals to the infrastructure to go back to the
resolvers to ask for a new one.
- 从以下版本开始:
- 4.0
- 作者:
- Andy Clement, Sam Brannen, Harry Yang
- 另请参阅:
-
方法概要
修饰符和类型方法说明execute(EvaluationContext context, Object target, Object... arguments) Execute a method in the specified context using the specified arguments.
-
方法详细资料
-
execute
TypedValue execute(EvaluationContext context, Object target, Object... arguments) throws AccessException Execute a method in the specified context using the specified arguments.- 参数:
context- the evaluation context in which the method is being executedtarget- the target of the method invocation; may benullforstaticmethodsarguments- the arguments to the method; should match (in terms of number and type) whatever the method will need to run- 返回:
- the value returned from the method
- 抛出:
AccessException- if there is a problem executing the method or if thisMethodExecutorhas become stale
-