类 ReflectiveMethodExecutor

java.lang.Object
cn.taketoday.expression.spel.support.ReflectiveMethodExecutor
所有已实现的接口:
MethodExecutor

public class ReflectiveMethodExecutor extends Object implements MethodExecutor
MethodExecutor that works via reflection.
从以下版本开始:
4.0
作者:
Andy Clement, Juergen Hoeller, Harry Yang
  • 字段详细资料

    • originalMethod

      private final Method originalMethod
    • methodToInvoke

      private final Method methodToInvoke
      The method to invoke via reflection, which is not necessarily the method to invoke in a compiled expression.
    • varargsPosition

      @Nullable private final Integer varargsPosition
    • computedPublicDeclaringClass

      private boolean computedPublicDeclaringClass
    • publicDeclaringClass

      @Nullable private Class<?> publicDeclaringClass
    • argumentConversionOccurred

      private boolean argumentConversionOccurred
  • 构造器详细资料

    • ReflectiveMethodExecutor

      public ReflectiveMethodExecutor(Method method)
      Create a new executor for the given method.
      参数:
      method - the method to invoke
    • ReflectiveMethodExecutor

      public ReflectiveMethodExecutor(Method method, @Nullable Class<?> targetClass)
      Create a new executor for the given method.
      参数:
      method - the method to invoke
      targetClass - the target class to invoke the method on
  • 方法详细资料

    • getMethod

      public final Method getMethod()
      Return the original method that this executor has been configured for.
    • getPublicDeclaringClass

      @Nullable public Class<?> 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 null if no such public type could be found
    • didArgumentConversionOccur

      public boolean didArgumentConversionOccur()
    • execute

      public TypedValue execute(EvaluationContext context, Object target, Object... arguments) throws AccessException
      从接口复制的说明: MethodExecutor
      Execute a method in the specified context using the specified arguments.
      指定者:
      execute 在接口中 MethodExecutor
      参数:
      context - the evaluation context in which the method is being executed
      target - the target of the method invocation; may be null for static methods
      arguments - 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 this MethodExecutor has become stale