接口 MethodResolver

所有已知实现类:
DataBindingMethodResolver, ReflectiveMethodResolver

public interface MethodResolver
A method resolver attempts to locate a method and returns a MethodExecutor that can be used to invoke that method.

The MethodExecutor will be cached, but if it becomes stale the resolvers will be called again.

从以下版本开始:
4.0
作者:
Andy Clement, Sam Brannen, Harry Yang
另请参阅:
  • 方法详细资料

    • resolve

      @Nullable MethodExecutor resolve(EvaluationContext context, Object targetObject, String name, List<TypeDescriptor> argumentTypes) throws AccessException
      Within the supplied context, resolve a suitable method on the supplied object that can handle the specified arguments.

      Returns a MethodExecutor that can be used to invoke that method, or null if no method could be found.

      参数:
      context - the current evaluation context
      targetObject - the object upon which the method is being called
      name - the name of the method
      argumentTypes - the types of arguments that the method must be able to handle
      返回:
      a MethodExecutor that can invoke the method, or null if the method cannot be found
      抛出:
      AccessException