public class

ReflectiveMethodResolver

extends Object
implements MethodResolver
java.lang.Object
   ↳ org.springframework.expression.spel.support.ReflectiveMethodResolver

Class Overview

A method resolver that uses reflection to locate the method that should be invoked.

Summary

Public Constructors
ReflectiveMethodResolver()
Public Methods
void registerMethodFilter(Class<?> type, MethodFilter filter)
MethodExecutor resolve(EvaluationContext context, Object targetObject, String name, List<TypeDescriptor> argumentTypes)
Locate a method on a type.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.expression.MethodResolver

Public Constructors

public ReflectiveMethodResolver ()

Public Methods

public void registerMethodFilter (Class<?> type, MethodFilter filter)

public MethodExecutor resolve (EvaluationContext context, Object targetObject, String name, List<TypeDescriptor> argumentTypes)

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.

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