org.springframework.expression.spel.support

Class DataBindingMethodResolver

    • Method Detail

      • resolve

        @Nullable
        public MethodExecutor resolve(EvaluationContext context,
                                                java.lang.Object targetObject,
                                                java.lang.String name,
                                                java.util.List<TypeDescriptor> argumentTypes)
                                         throws AccessException
        Description copied from class: ReflectiveMethodResolver
        Locate a method on a type. There are three kinds of match that might occur:
        1. an exact match where the types of the arguments match the types of the constructor
        2. an in-exact match where the types we are looking for are subtypes of those defined on the constructor
        3. a match where we are able to convert the arguments into those expected by the constructor, according to the registered type converter
        Specified by:
        resolve in interface MethodResolver
        Overrides:
        resolve in class ReflectiveMethodResolver
        Parameters:
        context - the current evaluation context
        targetObject - the object upon which the method is being called
        argumentTypes - the arguments that the constructor must be able to handle
        Returns:
        a MethodExecutor that can invoke the method, or null if the method cannot be found
        Throws:
        AccessException
      • isCandidateForInvocation

        protected boolean isCandidateForInvocation(java.lang.reflect.Method method,
                                                   java.lang.Class<?> targetClass)
        Description copied from class: ReflectiveMethodResolver
        Determine whether the given Method is 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 Object base class.

        Overrides:
        isCandidateForInvocation in class ReflectiveMethodResolver
        Parameters:
        method - the Method to evaluate
        targetClass - the concrete target class that is being introspected
      • forInstanceMethodInvocation

        public static DataBindingMethodResolver forInstanceMethodInvocation()
        Create a new data-binding method resolver for instance method resolution.