Top Description Methods
org.springframework.expression

public Interface ConstructorResolver

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

A constructor resolver attempts to locate a constructor and returns a ConstructorExecutor that can be used to invoke that constructor.

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

Authors
Andy Clement, Sam Brannen
Since
3.0
See Also
ConstructorExecutor, MethodResolver

Method Summary

Modifier and TypeMethod and Description
public ConstructorExecutor

Returns:

a ConstructorExecutor that can invoke the constructor, or null if the constructor cannot be found
resolve
(EvaluationContext
the current evaluation context
context
,
String
the fully-qualified name of the type upon which to look for the constructor
typeName
,
List<TypeDescriptor>
the types of arguments that the constructor must be able to handle
argumentTypes
)

Within the supplied context, resolve a suitable constructor on the supplied type that can handle the specified arguments.

Method Detail

resolveback to summary
public ConstructorExecutor resolve(EvaluationContext context, String typeName, List<TypeDescriptor> argumentTypes) throws AccessException

Within the supplied context, resolve a suitable constructor on the supplied type that can handle the specified arguments.

Returns a ConstructorExecutor that can be used to invoke that constructor (or null if no constructor could be found).

Parameters
context:EvaluationContext

the current evaluation context

typeName:String

the fully-qualified name of the type upon which to look for the constructor

argumentTypes:List<TypeDescriptor>

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

Returns:ConstructorExecutor

a ConstructorExecutor that can invoke the constructor, or null if the constructor cannot be found

Annotations
@Nullable