类 DataBindingMethodResolver
java.lang.Object
cn.taketoday.expression.spel.support.ReflectiveMethodResolver
cn.taketoday.expression.spel.support.DataBindingMethodResolver
- 所有已实现的接口:
MethodResolver
A
MethodResolver variant for data binding
purposes, using reflection to access instance methods on a given target object.
This accessor does not resolve static methods and also no technical methods
on java.lang.Object or java.lang.Class.
For unrestricted resolution, choose ReflectiveMethodResolver instead.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
方法概要
修饰符和类型方法说明static DataBindingMethodResolverCreate a new data-binding method resolver for instance method resolution.protected booleanisCandidateForInvocation(Method method, Class<?> targetClass) Determine whether the givenMethodis a candidate for method resolution on an instance of the given target class.resolve(EvaluationContext context, Object targetObject, String name, List<TypeDescriptor> argumentTypes) Locate a method on a type.从类继承的方法 cn.taketoday.expression.spel.support.ReflectiveMethodResolver
getMethods, registerMethodFilter
-
方法详细资料
-
resolve
@Nullable public MethodExecutor resolve(EvaluationContext context, Object targetObject, String name, List<TypeDescriptor> argumentTypes) throws AccessException 从类复制的说明:ReflectiveMethodResolverLocate a method on a type. There are three kinds of match that might occur:- an exact match where the types of the arguments match the types of the constructor
- an in-exact match where the types we are looking for are subtypes of those defined on the constructor
- a match where we are able to convert the arguments into those expected by the constructor, according to the registered type converter
- 指定者:
resolve在接口中MethodResolver- 覆盖:
resolve在类中ReflectiveMethodResolver- 参数:
context- the current evaluation contexttargetObject- the object upon which the method is being calledargumentTypes- the arguments that the constructor must be able to handle- 返回:
- a MethodExecutor that can invoke the method, or null if the method cannot be found
- 抛出:
AccessException
-
isCandidateForInvocation
从类复制的说明:ReflectiveMethodResolverDetermine whether the givenMethodis a candidate for method resolution on an instance of the given target class.The default implementation considers any method as a candidate, even for static methods sand non-user-declared methods on the
Objectbase class.- 覆盖:
isCandidateForInvocation在类中ReflectiveMethodResolver- 参数:
method- the Method to evaluatetargetClass- the concrete target class that is being introspected
-
forInstanceMethodInvocation
Create a new data-binding method resolver for instance method resolution.
-