类 ReflectiveMethodExecutor
java.lang.Object
cn.taketoday.expression.spel.support.ReflectiveMethodExecutor
- 所有已实现的接口:
MethodExecutor
MethodExecutor that works via reflection.- 从以下版本开始:
- 4.0
- 作者:
- Andy Clement, Juergen Hoeller, Harry Yang
-
字段概要
字段 -
构造器概要
构造器构造器说明ReflectiveMethodExecutor(Method method) Create a new executor for the given method.ReflectiveMethodExecutor(Method method, Class<?> targetClass) Create a new executor for the given method. -
方法概要
修饰符和类型方法说明booleanexecute(EvaluationContext context, Object target, Object... arguments) Execute a method in the specified context using the specified arguments.final MethodReturn the original method that this executor has been configured for.Class<?>Find a public class or interface in the method's class hierarchy that declares the original method.
-
字段详细资料
-
originalMethod
-
methodToInvoke
The method to invoke via reflection, which is not necessarily the method to invoke in a compiled expression. -
varargsPosition
-
computedPublicDeclaringClass
private boolean computedPublicDeclaringClass -
publicDeclaringClass
-
argumentConversionOccurred
private boolean argumentConversionOccurred
-
-
构造器详细资料
-
ReflectiveMethodExecutor
Create a new executor for the given method.- 参数:
method- the method to invoke
-
ReflectiveMethodExecutor
Create a new executor for the given method.- 参数:
method- the method to invoketargetClass- the target class to invoke the method on
-
-
方法详细资料
-
getMethod
Return the original method that this executor has been configured for. -
getPublicDeclaringClass
Find a public class or interface in the method's class hierarchy that declares the original method.See
ReflectionHelper.findPublicDeclaringClass(Method)for details.- 返回:
- the public class or interface that declares the method, or
nullif no such public type could be found
-
didArgumentConversionOccur
public boolean didArgumentConversionOccur() -
execute
public TypedValue execute(EvaluationContext context, Object target, Object... arguments) throws AccessException 从接口复制的说明:MethodExecutorExecute a method in the specified context using the specified arguments.- 指定者:
execute在接口中MethodExecutor- 参数:
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
-