Top Description Methods
org.springframework.expression

public Interface MethodResolver

Known Direct Implementers
org.springframework.expression.spel.support.ReflectiveMethodResolver
Annotations
@FunctionalInterface
Imports
java.util.List, org.springframework.core.convert.TypeDescriptor, org.springframework.lang.Nullable

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.

Authors
Andy Clement, Sam Brannen
Since
3.0
See Also
MethodExecutor, ConstructorResolver

Method Summary

Modifier and TypeMethod and Description
public MethodExecutor

Returns:

a MethodExecutor that can invoke the method, or null if the method cannot be found
resolve
(EvaluationContext
the current evaluation context
context
,
Object
the object upon which the method is being called
targetObject
,
String
the name of the method
name
,
List<TypeDescriptor>
the types of arguments that the method must be able to handle
argumentTypes
)

Within the supplied context, resolve a suitable method on the supplied object that can handle the specified arguments.

Method Detail

resolveback to summary
public 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.

Parameters
context:EvaluationContext

the current evaluation context

targetObject:Object

the object upon which the method is being called

name:String

the name of the method

argumentTypes:List<TypeDescriptor>

the types of arguments that the method must be able to handle

Returns:MethodExecutor

a MethodExecutor that can invoke the method, or null if the method cannot be found

Annotations
@Nullable